Open damosull opened 1 month ago
Hey ✌🏻,
I noticed you’re using cy.origin in your file:
cy.origin(
Cypress.env('okta_domain'),
{ args: { username, password } },
({ username, password }) => {
cy.get('input[name="identifier"]').type(username)
cy.get('input[name="credentials.passcode"]').type(password, {
log: false,
})
cy.get('[type="submit"]').click()
}
)
Inside the cy.origin block, you should navigate to the base URL of the Okta site. It seems you’re passing okta_domain as an argument, which I assume is the login URL ending with .com.
However, you should include a cy.visit inside the block to navigate to the specific login URL, like this:
cy.visit('/login')
This will ensure that Cypress properly visits the Okta login page before performing any actions.
Current behavior
When I attempt to log into a Single Page Okta application the test is going onto my homepage, but it's not navigating to the Okta page to log in.
Here is the error:
Desired behavior
I log in using the Okta sign-in
Test code to reproduce
Cypress Version
13.13.2
Node version
20.9.0
Operating System
macOS 14.5
Debug Logs
No response
Other
No response