-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cy.origin re-redirect #23236
Comments
Hey @stychu. Thank you for opening an issue (hopefully this one is simpler 😅 ). Just have a few questions:
This looks like a |
As described in the #22282 if I would trigger the OneLogin origin via button click for example from my app at /login it would do direct redirect to OneLogin origin and cy.origin works like a charm. Problem is I want to test a scenario where user gets redirected to login if not authenticated but he tries to access any page of the app. In this case server redirect doesnt seem to work with origin |
Awesome! As soon as it lands I will try it out. |
The code for this is done in cypress-io/cypress#23297, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
My login page is on different domain than the app.
I have a redirect within the app that redirects to the login domain.
Trying to make it work with
cy.origin
but it seems it doesn't pick up middle redirect from the app or I'm doing something wrong.Flow
This doesn't work because of the flow step 2 which triggers second redirect from within the app then goes to the login domain. I can see in the cypress my login domain loaded but cy.origin can't query the dom for the inputs to login
Seems like cy.origin expects direct redirect trigger to properly work.
Can i somehow overcome this? Tried to assert he step 2 url but
cy.origin
still doesn't workDesired behavior
cy.origin
should work when redirect triggers other redirects (middle redirects) leading to originTest code to reproduce
Cypress Version
10.4.0
Other
The text was updated successfully, but these errors were encountered: