Skip to content

Commit

Permalink
Update install instructions in README
Browse files Browse the repository at this point in the history
As mentioned in #80, our README still had plugin installation instructions for older versions of Cypress. This updates the instructions and links to the official Cypress docs as well.
  • Loading branch information
DigTheDoug committed Feb 24, 2023
1 parent 68f214c commit 0397fcc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Expand Up @@ -30,17 +30,17 @@ but this quick start will get you going in just a few minutes.
npm install @oreillymedia/cypress-playback -D
```

**Step 2.** Add the tasks to the project's `cypress/plugins/index.js` file:
**Step 2.** Add the tasks to the project's `setupNodeEvents` in `cypress.config.js` file
([Cypress plugin usage docs][10]):

```JavaScript
module.exports = (on, config) => {
setupNodeEvents(on, config) => {
require('@oreillymedia/cypress-playback/addTasks')(on, config);
// Add any other tasks
return config;
};
...
})
```

**Step 3.** Add the commands to the project's `cypress/support/index.js` file:
**Step 3.** Add the commands to the project's `cypress/support/commands.js` file:

```JavaScript
import '@oreillymedia/cypress-playback/addCommands';
Expand Down Expand Up @@ -596,4 +596,5 @@ None
[6]:#all-requests-complete-assertion
[7]:https://github.com/cypress-io/cypress
[8]:code-of-conduct.md
[9]:https://www.npmjs.com/package/@oreillymedia/cypress-playback
[9]:https://www.npmjs.com/package/@oreillymedia/cypress-playback
[10]:https://docs.cypress.io/guides/tooling/plugins-guide#Using-a-plugin

0 comments on commit 0397fcc

Please sign in to comment.