Skip to content
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 should throw an error when block is declared within same-origin context #24169

Closed
AtofStryker opened this issue Oct 7, 2022 · 3 comments · Fixed by #24569
Closed
Assignees
Labels
topic: cy.origin Problems or enhancements related to cy.origin command

Comments

@AtofStryker
Copy link
Contributor

What would you like?

if a user declares a cy.origin command with the same origin policy as that of the AUT/top, an error should be thrown to prompt the user that this is not needed and ask if the user did this intentionally

Why is this needed?

Currently there is some confusion around cy.origin when using same origin spec bridges to that of top/AUT where no feedback is virtually given. This should give users an actionable error message to guide them in the right direction when using cy.origin

Other

No response

@AtofStryker AtofStryker added topic: cy.origin Problems or enhancements related to cy.origin command experiment: origin labels Oct 7, 2022
@AtofStryker
Copy link
Contributor Author

There is one test that I know of that uses same origin spec bridges within the cy-in-cy tests. This will likely need to be changed when these changes go into effect

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2022

The code for this is done in cypress-io/cypress#24569, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Nov 9, 2022
@mjhenkes
Copy link
Member

Released in 11.0.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v11.0.1, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cy.origin Problems or enhancements related to cy.origin command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants