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
fix: Fix error when testing cross-origin code #685
base: master
Are you sure you want to change the base?
Conversation
|
@Nojay-Games Thanks for the contribution! Can you write a test to cover the logic for the fix you wrote? |
That fix is what I need, there is no way to merge it into production so I can update the dependency solve the conflict I have with the library when doing my tests? thanks! |
@Nojay-Games Will you have time to write a test for this? If the PR is incomplete, we'll have to close this. |
@jennifer-shehane logs are expired and i cannot understand whats wrong in tests, is ok for u to rerun the merge so we can see whats going wrong? |
@alecmestroni I pushed an empty commit. I believe the original ask was to write a test case that tests the added behavior here. Since there's nothing confirming this fixes the behavior or prevents regressions from being introduced. |
@jennifer-shehane Sadly its not an error during the test but its a permission bug related to the account used
|
@alecmestroni Yah, the snyk failure can be ignored. It doesn't run properly for contributors. |
@jennifer-shehane so tests are passing and merge can be applied |
When testing cross-origin websites with
cy.origin()
, the following error gets thrown:DOMException: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
This occurs when accessing
win.__coverage__
in the code. Since you don't control cross-origin code and it therefore doesn't need code coverage, you can simply ignore the code coverage if accessingwin.__coverage__
throws an error.