eager-baker-20941
09/15/2022, 4:44 PMexperimentalSessionAndOrigin 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
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.eager-baker-20941
09/15/2022, 4:46 PMCypress.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')
})
}
)