-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Allow reusing cy.server() in several tests and hooks #1183
Comments
Strongly related to this: #686 There's actually quite a bit of complexity here - not so much implementation details, but more about what a general Cypress workflow looks like and what we want users to adhere to. |
Had a doubt, if someone could answer https://stackoverflow.com/questions/59781881/is-it-ok-to-call-cy-server-twice-in-same-test-in-cypress |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
The features requested in this issue are now possible as part of
Please see the If you encounter any issues or unexpected behavior while using |
Is this a Feature or Bug?
Feature.
Current behavior:
cy.server()
is reset after each test case (it
) is run. This makes impossible things like this:We could do:
But the second test will fail as current server will have been reset (it's reset here).
We could do:
But then we have to set up the server twice.
Desired behavior:
Cypress should expose a way to tell
cy.server()
that we don't want to reset the server before each test or one way to tell that we want to preserve aliased routes.The text was updated successfully, but these errors were encountered: