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

Cached responses cause test failures #2

Open
tvsbrent opened this issue Jan 25, 2022 · 0 comments
Open

Cached responses cause test failures #2

tvsbrent opened this issue Jan 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tvsbrent
Copy link
Collaborator

tvsbrent commented Jan 25, 2022

Describe the bug

When the plugin is in record mode, any request that could be cached will return a 304 due to the default browser behavior. If the test is run multiple times in the same session, this will result in errors in subsequent test runs in the same session.

To Reproduce

  1. Open up the Sandbox app spec in record-only mode.
  2. Make sure "Disable caching" is not selected in the "Network" panel of dev tools.
  3. Run the test once.
  4. It passes.
  5. Run the test again.
  6. It fails.

Expected behavior
Instead of dropping 3xx responses or throwing an error, the plugin should see if there is a response recorded for that request and return that to the browser, even if the plugin is in record only mode.

Screenshots
n/a

Environment

  • OS: n/a
  • Cypress Version: n/a
  • Browser: n/a
  • Browser Version: n/a

Additional context
n/a

@tvsbrent tvsbrent added the bug Something isn't working label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant