-
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
Migrate from cy.route to cy.intercept - requests mocked via MSW are not intercepted anymore #14745
Comments
I also have the same issue ! |
I'm facing the same issue, not a big deal on my side but I would like to know the workaround about this. |
The issue appears to still exist in version 7.6.0. To add up to that - it's very unlikely that there is any race condition between the |
This comment was marked as off-topic.
This comment was marked as off-topic.
Feels like this might need to be stated more clearly in the docs as it's not that obvious (especially when we reach the point where we need to migrate to |
Does this mean that way of intercept data will no longer be supported? Or will there be another way? |
I can confirm that the problem still persists in 2022. |
any update on this? |
This comment was marked as off-topic.
This comment was marked as off-topic.
tested with msw
|
Since it is suggested to switch from |
yet, same problem, and i need to fork the cypress-msw-intercept to change to fit my case. |
the latest Cypress release 12.0 removes the I have tried using the https://github.com/deshiknaves/cypress-msw-interceptor but it doesnt seem to be able to priduce an alias that can be captured :( |
I have prepared a React + Vite boilerplate which includes integration of MSW with Vitest and Cypress. This allows to easily test an application with mocked responses. What's included ? Repo Please give it a ⭐️ if it helped. |
Current behavior
For our component tests we use storybook to render the component in isolation and cypress to run tests against it.
We have mocking done at Storybook level using Mock Service Worker
using cy.route we could successfully spy on the mocked requests, once migrating to cy.intercept even if I can see the requests in the network tab of the developer tools, they are not intercepted by the cy.intercept
Desired behavior
If this is a wanted change in behaviour, could you please advice on a workaround to migrate to cy.intercept that supports our use case?
Test code to reproduce
https://github.com/rosahealth/mws-cypress-storybook
Versions
Migrate from version 5.0.0 to 6.3.0
The text was updated successfully, but these errors were encountered: