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

Cypress browsers close after selecting payment method KLARNA #30621

Open
theoBourelakos opened this issue Nov 15, 2024 · 2 comments
Open

Cypress browsers close after selecting payment method KLARNA #30621

theoBourelakos opened this issue Nov 15, 2024 · 2 comments

Comments

@theoBourelakos
Copy link

theoBourelakos commented Nov 15, 2024

Current behavior

Steps:

  1. In check out, i select KLARNA payment method
  2. Click continue to payment
  3. Cypress browsers CLOSE when the loader appears on check out. (Happens only with KLARNA)

Desired behavior

Cypress browser not to close and redirect me to KLARNA page.

Test code to reproduce

      cy.get('[data-vtest="checkoutMainNavigationBottom"] > [data-vtest="navSuccessButton"] > [data-vtest="successButton"]').click()
          cy.wait(2000)

      /* HERE CYPRESS IS BEING CLOSED FORCEFULLY */ 
      
      //Verify correct URL 
        // Step 2: Handle Klarna payment page redirection
        cy.origin('https://pay.playground.klarna.com', () => {
          cy.url().should('include', 'pay.playground.klarna.com')
          cy.wait(2000)
          cy.get('#collectPhonePurchaseFlow__nav-bar__klarna_logo').should('exist').and('be.visible')
        });

        // Step 3: Handle Klarna login page redirection
        cy.origin('https://login.playground.klarna.com', () => {
          cy.url().should('include', 'login.playground.klarna.com')
          cy.get('body').should('exist').and('be.visible')
        });

Cypress Version

13.15.2

Node version

20.17.0

Operating System

Windows 11 Pro 21H2

Debug Logs

No response

Other

Klarna Close cypress browser

@mschile
Copy link
Contributor

mschile commented Nov 18, 2024

Hi @theoBourelakos, could you try enabling experimentalModifyObstructiveThirdPartyCode to see if that resolves the issue?

@theoBourelakos
Copy link
Author

theoBourelakos commented Nov 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants