10.9.0 broke cy.origin() requests
See original GitHub issueCurrent behavior
After upgrading from 10.8.0 to 10.9.0 my cy.origin()
requests no longer complete. They timeout instead.
Desired behavior
cy.origin()
requests should work as in 10.8.0
Test code to reproduce
In my app, once you enter a username/password on the sign up page, it redirects to a third-party page where I need to press an “Accept” button. My code is:
cy.visit('/sign-up');
// Fill out the sign up form
cy.get('#signup-email').type(email);
cy.get('#signup-password').type(password);
cy.get('#btn-signup').click();
// At this point, my app redirects to https://some.sub.domain.auth0.com/some_url
// Wait until we're redirected to Auth0, and click "Accept" there
cy.origin('auth0.com', () => {
cy.get('button').contains('Accept').click();
});
This would work in 10.8.0 but in 10.9.0 is times out with:
Timed out retrying after 40000ms: Expected to find content: 'Accept' within the element: [ <button#btn-login.btn.btn-primary.btn-block>, 5 more... ] but never did.
Rolling back to 10.8.0 makes the problem go away.
Cypress Version
10.9.0
Node version
16.14.1
Operating System
macOS 12.6
Debug Logs
No response
Other
I see that the changelog for 10.9.0 includes a bunch of changes to cy.origin()
but after reviewing the changes I don’t see why my simple usage of cy.origin()
would break completely.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Changelog - Cypress Documentation
Testing multiple origins in a single test with the new cy.origin() command. ... Use the cy.intercept() command to stub network responses and requests....
Read more >cypress-io/cypress - Gitter
it('has the right title', () =>{ cy.server(); cy.route('POST' ... hello all - I'm trying to memoize a cy.request call and getting null on...
Read more >Fixing Cypress cross-origin errors - Reflect.run
A step-by-step guide for avoiding cross-origin errors in Cypress tests via the cy.origin() and cy.session() commands introduced in Cypress ...
Read more >Actions · cypress-io/cypress · GitHub
[cy.intercept] `times` not working? ... 10.9.0 broke cy.origin() requests Triage: add issue/PR to project #334: Issue #24073 opened by EvHaus.
Read more >cy.origin() and multiple origins in the same domain
cy.visit('/mysecuredpage'); // this redirects to http://localhost:9081 cy.origin('http://localhost:9081', () => { cy.contains('Please log ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That looks great!
So interestingly upgrading to 10.10.0 made the problem go away entirely without any code changes. 🤷
Will close the issue.