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

Explore allowing cy command usage in cy.intercept callbacks #7667

Open
flotwig opened this issue Jun 10, 2020 · 0 comments
Open

Explore allowing cy command usage in cy.intercept callbacks #7667

flotwig opened this issue Jun 10, 2020 · 0 comments
Labels
pkg/driver This is due to an issue in the packages/driver directory topic: cy.intercept() type: enhancement Requested enhancement of existing feature

Comments

@flotwig
Copy link
Contributor

flotwig commented Jun 10, 2020

Current behavior:

cy commands are not explicitly treated differently when called from inside cy.route2 callbacks.

Desired behavior:

Cypress generally stops users from writing non-deterministic tests, and using cy commands inside of request/response callbacks would cause non-determinism.

cy commands should fail when called from inside cy.route2 callbacks with a clear error message explaining why.

Perhaps cy.now should remain, so users can have a backdoor to access Cypress commands directly

@flotwig flotwig added type: enhancement Requested enhancement of existing feature pkg/driver This is due to an issue in the packages/driver directory topic: cy.intercept() labels Jun 10, 2020
@jennifer-shehane jennifer-shehane changed the title Explore allowing cy command usage in cy.route2 callbacks Explore allowing cy command usage in cy.intercept callbacks Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/driver This is due to an issue in the packages/driver directory topic: cy.intercept() type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants