You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows consumers to use their own version of axe-core and significantly reduces the installation size. Also allow any 3.x or 4.x versions of axe-core in peer dependencies.
Closes#65, closes#59
This package provides three simple [Cypress](https://cypress.io) commands to help test your applications for accessibility issues using [axe-core](https://github.com/dequelabs/axe-core).
5
+
Test accessibility with [axe-core](https://github.com/dequelabs/axe-core) in [Cypress](https://cypress.io).
6
6
7
-
## Install and configure
7
+
## Installation
8
8
9
-
### Add as a dev dependency:
9
+
1.**Install `cypress-axe` from npm:**
10
10
11
11
```sh
12
-
npm i -D cypress-axe
12
+
npm install --save-dev cypress-axe
13
13
```
14
14
15
-
### Install peer dependencies:
15
+
2.**Install peer dependencies:**
16
16
17
17
```sh
18
-
npm i -D cypress
18
+
npm install --save-dev cypress axe-core
19
19
```
20
20
21
-
**NOTE:**_axe-core is now bundled and doesn't need to be installed as a peer dependency_
22
-
23
-
### Include the commands
24
-
25
-
Update `Cypress/support/index.js` file to include the cypress-axe commands by adding:
21
+
3.**Include the commands.** Update `cypress/support/index.js` file to include the cypress-axe commands by adding:
26
22
27
23
```js
28
24
import'cypress-axe'
29
25
```
30
26
31
-
### Add a task to log the messages to the terminal when the cypress executes the spec files
4.**Add a task to log the messages to the terminal** when Cypress executes the spec files. [Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage).
0 commit comments