-
Notifications
You must be signed in to change notification settings - Fork 24
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
React Native: Request not intercepted #67
Comments
@lisaweilguni did you figure out some solution? it is happening for me as well with a normal react app, the app loads fine in tests but api intercepts don't work |
We have set up an example React Native app reproducing the issue. Thanks in advance for your help! Feel free to reach out if you're facing a similar issue. |
Did any one of you get this working? We're facing the same issue with a normal vite react app 😞 Edit: |
Context
We are currently migrating the E2E test suite of a React app from Cypress to Playwright. Both Playwright and msw work perfectly for us. We use MSW also in combination with our Jest test suite, as well as for local manual testing. We would like to intercept and mock network requests that are performed by browsers during Playwright tests. In Cypress we managed to achieve it like this:
Problem
We tried to achieve the same behavior using
playwright-msw
, but the requests do not seem to get intercepted. The browser returns the original response that is defined in our msw environment (handlers.ts
). We have set up an example React Native app reproducing the fail.What we tried
test.ts
as suggested in the docsWhat could be the cause of the problem? Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: