[Multi-domain]: Support nested multi-domain commands
See original GitHub issueAdd support for nested multi-domain commands, for cases where you visit multiple domains in a row before ending up back on the test’s primary domain.
cy.visit('http://domain1.com')
cy.get('a').click() // takes you to domain2.com
cy.origin('domain2.com' () => {
cy.get('a').click() // takes you to domain3.com
cy.origin('domain3.com', () => {
cy.get('[data-cy="username"]').type('myusername')
cy.get('[data-cy="login"]').click() // takes you back to domain1.com
})
})
cy.get('h1').invoke('text').should('equal', 'Welcome, myusername!')
Issue Analytics
- State:
- Created 2 years ago
- Reactions:19
- Comments:6
Top Results From Across the Web
Multi-Domain (Origin) Testing in Cypress - DEV Community
Let's add the following code into our support/commands.js file. Cypress.Commands.add(" ...
Read more >Cypress 9.6.0: Easily test multi-domain workflows with cy.origin
The solution: multi-domain testing. With cy.origin() you can execute commands against any number of superdomains, all in the context of a single ...
Read more >Enable or disable multidomain name mapping searches
Multidomain name mapping searches are enabled by default. This option is available at the advanced privilege level. Steps. Set the privilege ...
Read more >Considerations for Multi-Domain Operation Success
command as the lead DOD entity to integrate, synchronize, and coordinate multi-domain operations (MDO) across the United States Government ...
Read more >Multi-Domain Command and Control
As MDC2 concepts mature in the coming years an overarching combined-arms Grand Strategy is needed so that each Service and NATO MDC2 strategies...
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
Im trying to use cy.origin() to log in through auth0 (which works) but then I need to nest another cy.origin() to sign in with google in Auth0. Im getting this error
@modern-sapien This solution works perfectly and allows multi-domain login flow to be implemented finally! Thank you!