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

5.5.0 Regression: Issue with testing of stripe card component #8992

Closed
juliachruszczowa opened this issue Oct 27, 2020 · 11 comments · Fixed by #9018
Closed

5.5.0 Regression: Issue with testing of stripe card component #8992

juliachruszczowa opened this issue Oct 27, 2020 · 11 comments · Fixed by #9018
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release v5.5.0 🐛 Issue present since 5.5.0

Comments

@juliachruszczowa
Copy link

juliachruszczowa commented Oct 27, 2020

After upgrading to version 5.5.0 there is an issue with testing of stripe card component

Current behavior

Selection!UNITO-UNDERSCORE!568
in cypress:open mode credit card field is not displayed

Versions

Works correctly in version 5.4.0
Selection!UNITO-UNDERSCORE!569

@jennifer-shehane
Copy link
Member

Right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please comment in this issue with a reproducible example and we will consider reopening the issue. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

@juliachruszczowa
Copy link
Author

juliachruszczowa commented Oct 28, 2020

@jennifer-shehane
to reproduce the issue this example simple test can be run on page https://stripe.dev/elements-examples/

 describe('My First Test', function () {
   it('test', function () {
     cy.visit('https://stripe.dev/elements-examples/');
     cy.get('.__PrivateStripeElement > iframe')
       .eq(0)
       .then(($iframe) => {
         const body = $iframe.contents().find('.InputContainer');
         cy.wrap(body).find(`input[name="cardnumber"]`).type('4242424242424242');
         cy.wrap(body).find(`input[name="exp-date"]`).type('12/20');
         cy.wrap(body).find(`input[name="cvc"]`).type('424');
       });
   });
 });

on version 5.4.0 it is working:
Selection_570

on version 5.5.0 - not:
Selection_571

@jennifer-shehane jennifer-shehane added type: regression A bug that didn't appear until a specific Cy version release v5.5.0 🐛 Issue present since 5.5.0 labels Oct 28, 2020
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Oct 28, 2020

Thanks for providing the example!

I can reproduce with the code below in Cypress 5.5.0. This was introduced in this PR: #8827. I git bisected to this commit where it started failing: 19fdf43

it('test', () => {
  cy.visit('https://stripe.dev/elements-examples/')
})

5.4.0

Screen Shot 2020-10-28 at 1 22 41 PM

Nothing in the console

Screen Shot 2020-10-28 at 1 56 20 PM

5.5.0

Screen Shot 2020-10-28 at 1 12 02 PM

Console has a lot of errors

Screen Shot 2020-10-28 at 1 57 57 PM

Workaround

You can ignore this error by adding this to your test file or support file, but I think the functionality of the app is messed up, so I don't think this will fix the overall issue.

I would suggest downgrading to 5.4.0 to workaround.

Cypress.on('uncaught:exception', () => {
  return false
})

@juliachruszczowa
Copy link
Author

@jennifer-shehane thanks a lot. I've already downgraded.
Will wait for update.

@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Oct 28, 2020
@sync-by-unito sync-by-unito bot changed the title Issue with testing of stripe card component in v.5.5.0 5.5.0 Regression: Issue with testing of stripe card component Oct 28, 2020
@boardofchris
Copy link

This is a significant issue that impacts all apps that use stripe.

You only need to include stripe to trigger failures within cypress, you do need to interact with stripe on your page or test for cypress to fail. Some tests will work, others will fail with cypress errors depending on what stripe is doing in the background.

I wasn't able to track this issue to cypress/stripe issue until I ran the failing tests in Firefox, where the error messages were more detailed. The embedded Electron browser fails with a generic cypress error.

Everyone with <script src="https://js.stripe.com/v3/"></script> in their project is impacted.

@fernandomartinez82
Copy link

I add more information. In my case I use 'Stripe' as a payment method. In version 5.1 - 5.4, works well. But with version 5.5 some field are blocked. And the text number card, date and ccv is not shown, only name of card appears.

image

@jennifer-shehane
Copy link
Member

@boardofchris @fernandomartinez82 We suggest downgrading to 5.4.0 until this is resolved. We are looking into a fix.

@fernandomartinez82
Copy link

@boardofchris @fernandomartinez82 We suggest downgrading to 5.4.0 until this is resolved. We are looking into a fix.

@jennifer-shehane It's an option, but I have other problems with lower versions that are solved in version 5.5. I will create 2 different projects with 2 different versions of Cypress, until the error is resolved

@jennifer-shehane
Copy link
Member

There's a PR open to fix this, so hopefully this makes it into the next release. #9018

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2020

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2020

Released in 5.6.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release v5.5.0 🐛 Issue present since 5.5.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants