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

Framebusting on 3rd party (top.location != location) breaks cypress test #14986

Closed
huseyinalp-zz opened this issue Feb 9, 2021 · 8 comments
Closed
Labels
stage: needs investigating Someone from Cypress needs to look at this type: bug

Comments

@huseyinalp-zz
Copy link

Cybpress 6.4.0 (6.4.0.597354)

When we're trying to test payment simulation using Cypress, we have trouble to complete writing test scenario for checkout flow. On our example, when we select payment methods, it redirects to an external page to confirm payment and somehow the test window closes immediately.

Sample URL : https://test.adyen.com/hpp/ideal/IssuerPage

On my configiration, I didn't disabled modifyObstructiveCode option.
modifyObstructiveCode : true (as default)

related issue : #886

@jennifer-shehane
Copy link
Member

@huseyinalp Can you provide the Cypress test code to reproduce the issue? Thanks!

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Feb 11, 2021
@huseyinalp-zz
Copy link
Author

huseyinalp-zz commented Feb 15, 2021

Hello @jennifer-shehane ;
I don't understand which part of test code you need but if you create small script to visit to sample URL, you can see what is happening.

describe('My First Test', () => {
  it('Visits Adyen page', () => {
    cy.visit('https://adoring-booth-f68425.netlify.app/');
    cy.get('#test').click();
  });
});

Thanks

@huseyinalp-zz
Copy link
Author

PayPal PPC002049:1.1:2d3ac8379c6b2

??

@huseyinalp-zz
Copy link
Author

Hello @jennifer-shehane ;
do you have any feedback for this?
Thanks

@jennifer-shehane
Copy link
Member

I can recreate the issue as described:

it('Visits Adyen page', () => {
  cy.visit('https://adoring-booth-f68425.netlify.app/');
  cy.get('#test').click();
});

Screen Shot 2021-05-06 at 3 24 03 PM

If you pass chromeWebSecurity: false, then the webpage breaks out of the Cypress iframe and takes up the entire runner window. experimentalSourceRewriting doesn't change the behavior.

Screen Shot 2021-05-06 at 3 25 09 PM

@AtofStryker
Copy link
Contributor

@huseyinalp-zz have you tried the new experimentalModifyObstructiveThirdPartyCode option?

@vishwa999
Copy link

vishwa999 commented Mar 1, 2023

@huseyinalp-zz Are you able to resolve the issue , even i am having the same issue, so if you solved this issue, can you ping me the code snippet which works fine to handle the 3rd party url.

@AtofStryker
Copy link
Contributor

@vishwa999 I am going to close this issue as stale since I haven't heard back from @huseyinalp-zz . You can try the experimentalModifyObstructiveThirdPartyCode options or if on an older version of Cypress, possibly setting chromeWebSecurity to false. If this is still an issue for you, can you open a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this type: bug
Projects
None yet
Development

No branches or pull requests

5 participants
@jennifer-shehane @huseyinalp-zz @AtofStryker @vishwa999 and others