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
.origin() doesn't differentiate subdomains as individual origins #24820
Comments
Same scenario happens also for me, having node v16 and 11.2 |
It works if you just remove the .origin(). But that can't be the solution... right? |
Hi @ChristofFritz , in this use case you would not use cy.origin. We have a couple of discussions and a thread on an issue related to this topic. This is a topic we will be following how real world utilization goes for cy.origin and see if this is something that we should alter in the future. However for now we do not have plans to change this behavior. |
Hi ! Not sure if anyone will see this comment but i feel there are things to add here. In my scenario, more specifically using SSO Authentication (identidy provider is on a super-domain that we own), there are situations where the identity provider is or is not on the same super domain than top origin, depending on the environment on which the tests are run. Examples:
What are we to do ? |
echoing @singeryo's scenario as well... |
We have exactly the same problem as @singeryo. Will there be a solution for this scenario or do you have a good workaround? I don't want to execute different test code depending on the environment. |
@rspu, @dkurucz, you could try using experimentalSkipDomainInjection which would require you to use |
here's a solution for @singeryo's situation that many of us find ourselves in. This will use origin if the environment variable
|
|
Current behavior
The .origin() command doesn't accept new origin that haves the same domain but a different subdomain.
This worked in cypress 10, but stopped working after the upgrade to 11.
Desired behavior
Being able to use new origin with different subdomain but the same domain.
Test code to reproduce
https://github.com/ChristofFritz/cypress-test-tiny
Downgrade to 10.3.0 and it works
Cypress Version
11.2.0
Node version
v18.10.0
Operating System
macOS 12.6
Debug Logs
cy.origin() requires the first argument to be a different domain than top. You passed https://submit-e2e-fix.review.redacted.de to the origin command, while top is at https://app-e2e-fix.review.redacted.de
Other
No response
The text was updated successfully, but these errors were encountered: