Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Cypress.isBrowser() to allow for bool/array checks #7168

Closed
jennifer-shehane opened this issue Apr 29, 2020 · 2 comments · Fixed by #5346
Closed

Expand Cypress.isBrowser() to allow for bool/array checks #7168

jennifer-shehane opened this issue Apr 29, 2020 · 2 comments · Fixed by #5346
Assignees
Labels
type: feature New feature that does not currently exist

Comments

@jennifer-shehane
Copy link
Member

Current behavior:

You can run checks against Cypress.isBrowser() by passing the name of the browser or by passing an object to match against.

Cypress.isBrowser('firefox')
Cypress.isBrowser({ family: 'chromium', channel: 'stable' })

Desired behavior:

Expand this behavior to allow for a bool check and to check an array of browsers:

Cypress.isBrowser('!chrome')
Cypress.isBrowser(['electron', 'chrome'])
Cypress.isBrowser(['!electron', '!chrome'])
Cypress.isBrowser([
  { family: 'chromium', channel: 'canary' },
  { family: 'firefox', channel: 'dev' }
])

Versions

4.5.0

@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Apr 29, 2020
@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Apr 29, 2020
@kuceb kuceb mentioned this issue Apr 29, 2020
15 tasks
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jun 4, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 4, 2020

The code for this is done in cypress-io/cypress#5346, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 8, 2020

Released in 4.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.8.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants