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

cy.server whitelist behaves as blacklist #6642

Closed
alex-golubtsov opened this issue Mar 4, 2020 · 3 comments · Fixed by #7782
Closed

cy.server whitelist behaves as blacklist #6642

alex-golubtsov opened this issue Mar 4, 2020 · 3 comments · Fixed by #7782
Labels
type: breaking change Requires a new major release version

Comments

@alex-golubtsov
Copy link

Current behavior:

Currently whitelist option for cy.server() actually works as blacklist due to this line
https://github.com/cypress-io/cypress/blob/master/packages/driver/src/cypress/server.coffee#L236

In other words:

cy.server({ whitelist: () => true })

will ignore any request

and

cy.server({ whitelist: () => false})

will catch all requests

Desired behavior:

Exactly opposite

cy.server({ whitelist: () => true })

should catch all requests

and

cy.server({ whitelist: () => false})

should ignore any request

Test code to reproduce

cy.server()
cy.route(<any route>)

Versions

4.1.0, also reproducible in master
win10, chrome

@jennifer-shehane
Copy link
Member

yeeeaaah...I can see this. This would require a breaking change.

@cypress-bot cypress-bot bot added the stage: proposal 💡 No work has been done of this issue label Mar 5, 2020
@jennifer-shehane jennifer-shehane added the type: breaking change Requires a new major release version label Mar 5, 2020
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: proposal 💡 No work has been done of this issue stage: work in progress labels Jun 23, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 30, 2020

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

@jennifer-shehane
Copy link
Member

Released in 5.0.0.

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

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: breaking change Requires a new major release version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants