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
cy.route2 routes not being matched with external URLs #8487
Comments
One thing we tried (with no luck) in addition to what is mentioned above is adding
before the |
This is probably a bug where we aren't intercepting all HTTP traffic, only HTTP traffic that seems pertinent to the current test. With @benwells |
+1 for this. We're noticing an intermittent issue in Cypress, where some calls are not being added to the window.performance registry. We were using this workaround to check if a non-xhr request was being made. So we thought we'd give route2 a go, but as this particular call isn't on the same domain as the app being tested, route2 doesn't pick it up. |
What are the estimates of fixing it? We have this strange issue when using |
I am also seeing this behavior in the new 5.2.0 version. |
I've narrowed down the issue and it seems to only affect HTTPS traffic to a different origin, opened a PR to fix: #8662 |
The code for this is done in cypress-io/cypress#8662, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
First of all, thanks for the work on
cy.route2
, it looks like it's going to make a lot of things much easier to do! I've jumped in to try it out and am having some trouble with URLs that are outside of my application (ie, API requests and such).Current behavior:
If the application sends a request to an external URL:
In the tests, when
cy.route2
is used, it does not appear to be possible to match the request.Specifying
path
:Specifying
url
:Specifying
hostname
:Specifying
hostname
andpath
:Desired behavior:
The request should be matched by the routes, and stubbed accordingly.
Test code to reproduce
https://github.com/blakemann/cypress-test-tiny
Versions
Cypress: 5.1.0
Operating System: MacOS Catalina (10.15.6)
Browser: Chrome 85
The text was updated successfully, but these errors were encountered: