You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on the testcafe based on NextJS framework and integrated msw library for mocking requests. Testcafe hammeread doesn't forward the some mock requests to the msw service worker and the requests fail with 404 Not Found.
I debugged some hammerhead library codes and I guess this is related to the scope problem of hammerhead but not sure how I can fix this.
The scenario described below works if experimentalProxyless is enabled on version 2.4.0. On version 3.1.0 - the error is reproduced both with experimentalProxyless disabled and enabled
What is the Current behavior?
Interestingly, the mocking requests at testcafe tests work fine at the level 1 route pages(like '/', '/account', '/login', ...) and not working at deeper level sub-paths (e.g '/account/login', '/account/login/test', ...).
What is the Expected behavior?
The mocking request at testcafe should work at every sub paths. :)
What is your public website URL? (or attach your complete example)
We appreciate you taking the time to share the information about this issue. We replicated it, and it is currently in our internal queue. Please note that the research may take time. We'll update this thread once we have news.
We fixed the described issue in the following PR: #8084
Please note that the issue is fixed only in Native Automation mode, which is enabled by default. If you need to use a hammerhead-based solution, please describe in detail why you can't use Native Automation mode.
A release with the fix is not published yet, so you can test the solution using the main branch of the TestCafe repository. Please refer to the following help topic to get details: Install TestCafe from source
What is your Scenario?
I'm working on the testcafe based on NextJS framework and integrated msw library for mocking requests. Testcafe hammeread doesn't forward the some mock requests to the msw service worker and the requests fail with 404 Not Found.
I debugged some hammerhead library codes and I guess this is related to the scope problem of hammerhead but not sure how I can fix this.
The scenario described below works if experimentalProxyless is enabled on version 2.4.0. On version 3.1.0 - the error is reproduced both with experimentalProxyless disabled and enabled
What is the Current behavior?
Interestingly, the mocking requests at testcafe tests work fine at the level 1 route pages(like '/', '/account', '/login', ...) and not working at deeper level sub-paths (e.g '/account/login', '/account/login/test', ...).
What is the Expected behavior?
The mocking request at testcafe should work at every sub paths. :)
What is your public website URL? (or attach your complete example)
To reproduce
What is your TestCafe test code?
https://github.com/Roy412/msw-testcafhttps://github.com/Roy412/msw-testcafe-error/blob/main/testcafe/rest.spec.tse-error/blob/main/testcafe/rest.spec.ts
Your complete configuration file
No response
Your complete test report
Screenshots
Steps to Reproduce
To reproduce
TestCafe version
3.3.0
Node.js version
v16.16.0
Command-line arguments
NEXT_PUBLIC_IS_TESTCAFE=1 node runtestCafe.js
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
No response
The text was updated successfully, but these errors were encountered: