File tree 6 files changed +81
-24
lines changed
6 files changed +81
-24
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ sidebar_position: 1
3
3
---
4
4
5
5
# @qavajs/template
6
+
7
+ ::: warning
8
+
9
+ @qavajs/template is discouraged. Please use built-in ` this.executeStep `
10
+
11
+ :::
12
+
6
13
Module that allow to define step definitions on Gherkin language.
7
14
## Installation
8
15
``` shell
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Library can work on top of playwright and webdriverio drivers
8
8
9
9
## Installation
10
10
```
11
- npm install @qavajs/steps-lighthouse@1
11
+ npm install @qavajs/steps-lighthouse@0. 1
12
12
```
13
13
14
14
## Configuration
Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change @@ -8,48 +8,36 @@ Steps to perform accessibility checks using axe library.
8
8
It is docs for qavajs v2. If you are looking docs for v1 go to [ (v1 docs)] ( ../Steps-v1/accessibility-v1.md )
9
9
10
10
## Installation
11
- ```
12
- npm install @qavajs/steps-accessibility
13
- ```
11
+ ` npm install @qavajs/steps-accessibility `
14
12
15
- ## Config
13
+ ## Configuration
16
14
``` javascript
17
15
module .exports = {
18
16
default: {
19
17
require: [
20
18
' node_modules/@qavajs/steps-wdio/index.js' , // corresponding driver library should be imported first
21
19
' node_modules/@qavajs/steps-accessibility/index.js'
22
20
],
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
- },
34
21
format: [
35
22
' @qavajs/html-formatter:report.html'
36
23
],
37
24
}
38
25
}
39
26
```
40
27
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
47
30
48
31
``` gherkin
49
32
Feature: Accessibility
50
33
51
34
Scenario: perform accessibility check
52
35
When I open 'https://qavajs.github.io/' url
53
36
And I perform accessibility check
54
- ```
55
-
37
+ And I perform accessibility check:
38
+ """
39
+ {
40
+ "runOnly": ["wcag2a"]
41
+ }
42
+ """
43
+ ```
Original file line number Diff line number Diff line change @@ -380,6 +380,15 @@ Select option with certain index from select element
380
380
When I select 1 option from 'Registration Form > Date Of Birth' dropdown
381
381
```
382
382
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
+
383
392
---
384
393
### I accept alert
385
394
Original file line number Diff line number Diff line change @@ -428,6 +428,17 @@ Scroll by offset in element
428
428
When I scroll by '0, 100' in 'Overflow Container'
429
429
```
430
430
_________________________
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
+ ---
431
442
### I accept alert
432
443
433
444
Accepts an alert
You can’t perform that action at this time.
0 commit comments