-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fetch through webworker are not handled by cypress resulting in wait() timeout #7840
Comments
I am pretty certain this isn't possible yet, because Service Workers and Web Workers use different scopes. Cypress can indeed stub/spy on In my app, I also workaround it by disabling service worker fetching using routing (e.g. Related to #687 I think. |
I'm experiencing the same thing using the new |
I have the same issue as @nicholaschiang. For me the I can also see that if you use a |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior:
The
wait()
command will not be triggered if a fetch is done through webworkers.Because the request is never handled, the test will fail because of timeout.
Desired behavior:
Trigger
wait
when a fetch is done through webworkers, indeed in an other thread.Test code to reproduce
If the browser support webworkers I use specific function
fetchResourceWithWorker
My only alternative for now is to do something like this:
It is not really useful to provide cypress specs code sample, because all my specs using
wait()
are failing since webworkers are used in the codebase.Versions
Chrome: Version 83.0.4103.116
MacOS: 10.15.5
Cypress: 4.3.0
The text was updated successfully, but these errors were encountered: