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

Update README.md #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ yarn add --dev cypress-plugin-stripe-elements
```

Set `{ "chromeWebSecurity": false }` in your `cypress.json` file, or the plugin
will not work.
will not work. If Cypress is running, you will have to restart.

Import the plugin in your `cypress/support/index.js` file:

Expand Down Expand Up @@ -71,7 +71,7 @@ describe('payment form', () => {
// in case you have multiple Stripe Elements on the page.
cy.get('#card-element').within(() => {
cy.fillElementsInput('cardNumber', '4242424242424242');
cy.fillElementsInput('cardExpiry', '1025'); // MMYY
cy.fillElementsInput("cardExpiry", "12" + (new Date().getFullYear() + 1).toString().substring(2,4)); // MMYY
cy.fillElementsInput('cardCvc', '123');
cy.fillElementsInput('postalCode', '90210');
});
Expand All @@ -96,4 +96,4 @@ CYPRESS_TEST_APP_PORT=4000 STRIPE_PUBLISHABLE_KEY=your_key_here yarn test
## Examples

- [Local Demo from this repository](https://github.com/dbalatero/cypress-plugin-stripe-elements/blob/master/cypress/integration/basic_spec.ts
- [Stripe Payments Demo - stripe official demo project](https://github.com/riccardogiorato/cypress-for-everything/blob/main/examples/stripe/cypress/integration/stripe-elements.ts)
- [Stripe Payments Demo - stripe official demo project](https://github.com/riccardogiorato/cypress-for-everything/blob/main/examples/stripe/cypress/integration/stripe-elements.ts)