Skip to content

Commit a33501b

Browse files
added new accessibility library (#92)
added new accessibility library discouraged templates
1 parent 58d0444 commit a33501b

File tree

6 files changed

+81
-24
lines changed

6 files changed

+81
-24
lines changed

docs/Modules/template.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ sidebar_position: 1
33
---
44

55
# @qavajs/template
6+
7+
:::warning
8+
9+
@qavajs/template is discouraged. Please use built-in `this.executeStep`
10+
11+
:::
12+
613
Module that allow to define step definitions on Gherkin language.
714
## Installation
815
```shell

docs/Steps-v1/lighthouse-v1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Library can work on top of playwright and webdriverio drivers
88

99
## Installation
1010
```
11-
npm install @qavajs/steps-lighthouse@1
11+
npm install @qavajs/steps-lighthouse@0.1
1212
```
1313

1414
## Configuration

docs/Steps/accessibility-ea-v2.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
sidebar_position: 7
3+
---
4+
5+
# @qavajs/steps-accessibility-ea
6+
Steps to perform accessibility checks using accessibility-checker library.
7+
Library can work on top of playwright and webdriverio drivers
8+
9+
## Installation
10+
`npm install @qavajs/steps-accessibility-ea`
11+
12+
## Configuration
13+
```javascript
14+
module.exports = {
15+
default: {
16+
require: [
17+
'node_modules/@qavajs/steps-wdio/index.js', //corresponding driver library should be imported first
18+
'node_modules/@qavajs/steps-accessibility-ea/index.js'
19+
],
20+
format: [
21+
'@qavajs/html-formatter:report.html'
22+
],
23+
}
24+
}
25+
```
26+
27+
## Usage
28+
Lib provides `I perform accessibility check` step that creates axe instance, performs checks and attach html report in base 64 format
29+
30+
```gherkin
31+
Feature: Accessibility
32+
33+
Scenario: perform accessibility check
34+
When I open 'https://qavajs.github.io/' url
35+
And I perform accessibility check
36+
And I perform accessibility check:
37+
"""
38+
{
39+
"outputFormat": ["json", "html"]
40+
}
41+
"""
42+
```

docs/Steps/accessibility-v2.md

+11-23
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,36 @@ Steps to perform accessibility checks using axe library.
88
It is docs for qavajs v2. If you are looking docs for v1 go to [(v1 docs)](../Steps-v1/accessibility-v1.md)
99

1010
## Installation
11-
```
12-
npm install @qavajs/steps-accessibility
13-
```
11+
`npm install @qavajs/steps-accessibility`
1412

15-
## Config
13+
## Configuration
1614
```javascript
1715
module.exports = {
1816
default: {
1917
require: [
2018
'node_modules/@qavajs/steps-wdio/index.js', //corresponding driver library should be imported first
2119
'node_modules/@qavajs/steps-accessibility/index.js'
2220
],
23-
/**
24-
* Axe configuration to customize axe instance define axe property which is a function that accepts AxeBuilder instance
25-
* more info:
26-
* https://www.npmjs.com/package/@axe-core/webdriverio
27-
* https://www.npmjs.com/package/@axe-core/playwright
28-
* @param {AxeBuilder} instance - instance of axe builder
29-
* @return {AxeBuilder}
30-
*/
31-
axe: function (instance) {
32-
return instance.withTags('wcag2a')
33-
},
3421
format: [
3522
'@qavajs/html-formatter:report.html'
3623
],
3724
}
3825
}
3926
```
4027

41-
## Steps
42-
43-
---
44-
### I perform accessibility check
45-
46-
Perform accessibility check and attach report
28+
## Usage
29+
Lib provides `I perform accessibility check` step that creates axe instance, performs checks and attach html report in base 64 format
4730

4831
```gherkin
4932
Feature: Accessibility
5033
5134
Scenario: perform accessibility check
5235
When I open 'https://qavajs.github.io/' url
5336
And I perform accessibility check
54-
```
55-
37+
And I perform accessibility check:
38+
"""
39+
{
40+
"runOnly": ["wcag2a"]
41+
}
42+
"""
43+
```

docs/Steps/playwright-v2.md

+9
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,15 @@ Select option with certain index from select element
380380
When I select 1 option from 'Registration Form > Date Of Birth' dropdown
381381
```
382382

383+
---
384+
### I will wait for alert/dialog
385+
386+
Start listening for dialog
387+
388+
```gherkin
389+
When I will wait for dialog
390+
```
391+
383392
---
384393
### I accept alert
385394

docs/Steps/wdio-v2.md

+11
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,17 @@ Scroll by offset in element
428428
When I scroll by '0, 100' in 'Overflow Container'
429429
```
430430
_________________________
431+
432+
---
433+
### I will wait for alert/dialog
434+
435+
Start listening for dialog
436+
437+
```gherkin
438+
When I will wait for dialog
439+
```
440+
441+
---
431442
### I accept alert
432443

433444
Accepts an alert

0 commit comments

Comments
 (0)