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 10 doc change #14

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
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ yarn add --dev cypress-plugin-stripe-elements
Set `{ "chromeWebSecurity": false }` in your `cypress.json` file, or the plugin
will not work.

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


```es6
// cypress/support/commands.js

import 'cypress-plugin-stripe-elements';
```

In older versions of cypress (<10) place the import in `cypress/support/index.js`

```es6
// cypress/support/index.js
Expand Down Expand Up @@ -96,4 +105,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)