Cypress error cy.visit() failed because you are attempting to visit a URL that is of a different origin
Cypress runs a test in one origin at a time, and the test tried to cross to a different domain mid-flow.
Why this happens
- The flow under test navigates from origin A to origin B (e.g. a third-party login page) partway through
How to fix it
- Wrap the cross-origin portion in `cy.origin('https://other-domain.com', () => { ... })`
- If the cross-origin hop isn't essential to what you're testing, split it into a separate, focused test instead