After version 5.5 Stripe Checkout tests break out of the iframe
See original GitHub issueCurrent behavior
When testing a Stripe Checkout workflow the stripe.redirectToCheckout
or the redirected page breaks out of the iframe and instead of completing the test just hangs.
Desired behavior
I’d expect the application to not break out of the iframe and the test runner to continue working even after being redirected to the Stripe Checkout page. (Like it did with version 5.5.0 and below)
Test code to reproduce
Here’s a link to a repo with a simple React app to reproduce the issue. https://github.com/kide-science/cypress-test-tiny
Unfortunately I was not able to reproduce the issue with vanilla JS. Stripe seems to do the redirect with:
window.top.location.href = redirectUrl
Setting the top.location.href
seems to work without breaking out of the iframe, which leads me to believe that there are additional checks before the redirect or on the Stripe hosted Checkout page after the redirect that cause the test to break out of the iframe.
Versions
Cypress version: 6.0.1 Last known working Cypress version: 5.5.0 Browser: Chrome 87 MacOS Mojave
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:32 (2 by maintainers)
Top GitHub Comments
oh my fcking god. Now you’re telling me not built yet? fuck… I almost launch production with it…
Before closing it would be good to have a suggested workaround from someone at Cypress. Not being able to test checkout flows is pretty problematic.