https://cypress.io logo
Has anyone tried using the `experimentalSessionAnd...
# help
e
Has anyone tried using the
experimentalSessionAndOrigin
feature to log in via Auth0's UI, as outlined here? https://cypress.io/blog/2022/04/25/cypress-9-6-0-easily-test-multi-domain-workflows-with-cy-origin/ In the video,
cy.origin
immediately invokes the callback and you can start executing commands inside the new origin context. But when I try it, cypress ends up hanging while it waits for a document load event from the Auth0 login page
Copy code
CypressError: Timed out after waiting `60000ms` for your remote page to load.
Your page did not fire its `load` event within `60000ms`.
You can try increasing the `pageLoadTimeout` value in `cypress.config.ts` to wait longer.
Browsers will not fire the `load` event until all stylesheets and scripts are done downloading.
When this `load` event occurs, Cypress will continue running commands.
here's the command I where I try to use the multi-domain workflow:
Copy code
Cypress.Commands.add(
  'login',
  (username: string, password: string) => {
    cy.visit('/')
    cy.get('.login-page-button').click()

    const args = { username, password }
    cy.origin(`https://${Cypress.env('auth0_domain')}`, { args }, ({ username, password }) => {
      cy.log('inside cy.origin')
    })
  }
)