axe-core-cucumber 2.6.1.pre.acca0cb → 2.6.1.pre.b702a53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dd9360f3cf55c327851ba1e170ad15dc99806d0de4038613e8aaa195e60a2ce
|
4
|
+
data.tar.gz: c2247896748b98366da1841c931d4ecd56037eccbbd0251b0d3437c4d8e58810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 924150eb8d60168fd43aa1890c4458c84fc04acbdc7184548b91b46719aa8f14fae5cb04dab41f788242cc064c059f9b978ab5f0ba209e6e033168f2bfd6b7f9
|
7
|
+
data.tar.gz: b5d050125914e90be455412de3f2e0f4e7e82862588f0428cb7d928da354b5b5671d188d21643e538bcdc0f312d121b215934f55a842c80e012e05f3f303f88b
|
data/README.md
CHANGED
@@ -3,33 +3,35 @@ The `axe-core-cucumber` gem provides a custom step defintions to evalaute the ac
|
|
3
3
|
|
4
4
|
## Usage
|
5
5
|
|
6
|
-
|
6
|
+
- In your Gemfile, add the `axe-core-cucumber` gem.
|
7
|
+
|
8
|
+
```Gemfile
|
9
|
+
source "https://rubygems.org"
|
7
10
|
|
8
|
-
``` gemspec
|
9
11
|
gem 'axe-core-cucumber'
|
10
12
|
```
|
11
13
|
|
12
|
-
|
14
|
+
- Require `axe-cucumber-steps` to makes all of the axe-cucumber step definitions available to be used directly in your cucumber features.
|
13
15
|
|
14
16
|
``` rb
|
15
|
-
require 'axe-
|
17
|
+
require 'axe-cucumber-steps'
|
16
18
|
```
|
17
19
|
|
18
|
-
|
20
|
+
- Use with webdriver of choice.
|
19
21
|
|
20
22
|
## Cucumber Steps
|
21
23
|
|
22
24
|
### Base Step
|
23
25
|
|
24
|
-
The base step `be
|
26
|
+
The base step `be axe clean` is the core component of the step. It is a complete step on its own and will verify the currently loaded page is axe clean using the default configuration of [axe.run][axe-run] (the entire document is checked using the default rules).
|
25
27
|
|
26
28
|
```gherkin
|
27
|
-
Then the page should be
|
29
|
+
Then the page should be axe clean
|
28
30
|
```
|
29
31
|
|
30
32
|
#### Clauses
|
31
33
|
|
32
|
-
Clauses are chainable methods for the `be
|
34
|
+
Clauses are chainable methods for the `be axe clean` custom step.Configurable clauses allows for greater granularity with testing and expectaions.
|
33
35
|
|
34
36
|
##### `within` - Inclusion clause
|
35
37
|
|
@@ -37,7 +39,7 @@ The inclusion clause ( `within "#selector"` ) specifies which elements of the pa
|
|
37
39
|
*see additional [context parameter documentation][context-param]*
|
38
40
|
|
39
41
|
``` gherkin
|
40
|
-
Then the page should be
|
42
|
+
Then the page should be axe clean within "#selector"
|
41
43
|
```
|
42
44
|
|
43
45
|
##### `excluding` - Exclusion clause
|
@@ -46,14 +48,14 @@ The exclusion clause ( `excluding "#selector"` ) specifies which elements of the
|
|
46
48
|
*see additional [context parameter documentation][context-param]*
|
47
49
|
|
48
50
|
``` gherkin
|
49
|
-
Then the page should be
|
51
|
+
Then the page should be axe clean excluding "#selector"
|
50
52
|
```
|
51
53
|
|
52
54
|
If desired, a semicolon ( `;` ) or the word `but` may be used to separate the exclusion clause from the inclusion clause (if present).
|
53
55
|
|
54
56
|
``` gherkin
|
55
|
-
Then the page should be
|
56
|
-
Then the page should be
|
57
|
+
Then the page should be axe clean within "main"; excluding "aside"
|
58
|
+
Then the page should be axe clean within "main" but excluding "aside"
|
57
59
|
```
|
58
60
|
|
59
61
|
##### `according to` - Accessibility Standard (Tag) clause
|
@@ -62,13 +64,13 @@ The tag clause specifies which accessibility standard (or standards) should be u
|
|
62
64
|
The acceptable [tag names are documented][options-param] as well as a [complete listing of rules][rules] that correspond to each tag.
|
63
65
|
|
64
66
|
``` gherkin
|
65
|
-
Then the page should be
|
67
|
+
Then the page should be axe clean according to: tag-name
|
66
68
|
```
|
67
69
|
|
68
70
|
If desired, a semicolon ( `;` ) may be used to separate the tag clause from the preceding clause.
|
69
71
|
|
70
72
|
``` gherkin
|
71
|
-
Then the page should be
|
73
|
+
Then the page should be axe clean within "#header"; according to: best-practice
|
72
74
|
```
|
73
75
|
|
74
76
|
##### `checking` - Checking Rules clause
|
@@ -76,7 +78,7 @@ Then the page should be accessible within "#header"; according to: best-practice
|
|
76
78
|
The checking-rules clause specifies which *additional* rules to run (in addition to the specified tags, if any, or the default ruleset). The rules are specified by comma-separated rule IDs.
|
77
79
|
|
78
80
|
``` gherkin
|
79
|
-
Then the page should be
|
81
|
+
Then the page should be axe clean checking: ruleId
|
80
82
|
```
|
81
83
|
|
82
84
|
*see [rules documentation][rules] for a list of valid rule IDs*
|
@@ -84,8 +86,8 @@ Then the page should be accessible checking: ruleId
|
|
84
86
|
If desired, a semicolon ( `;` ) or the word `and` may be used to separate the checking-rules clause from the preceding clause.
|
85
87
|
|
86
88
|
``` gherkin
|
87
|
-
Then the page should be
|
88
|
-
Then the page should be
|
89
|
+
Then the page should be axe clean according to: wcag2a; checking: color-contrast
|
90
|
+
Then the page should be axe clean according to: wcag2a and checking: color-contrast
|
89
91
|
```
|
90
92
|
|
91
93
|
##### `checking only` - Exclusive Rules clause
|
@@ -93,7 +95,7 @@ Then the page should be accessible according to: wcag2a and checking: color-cont
|
|
93
95
|
This clause is not really a separate clause. But rather, by adding the word `only` to the checking-rules clause, the meaning of the step can be changed. As described above, by default the checking-rules clause specifies *additional* rules to run. If the word `only` is used, then *only* the specified rules are checked.
|
94
96
|
|
95
97
|
``` gherkin
|
96
|
-
Then the page should be
|
98
|
+
Then the page should be axe clean checking only: ruleId
|
97
99
|
```
|
98
100
|
|
99
101
|
##### `skipping` - Skipping Rules clause
|
@@ -101,7 +103,7 @@ Then the page should be accessible checking only: ruleId
|
|
101
103
|
The skipping-rules clause specifies which rules to skip. This allows an accessibility standard to be provided (via the tag clause) while ignoring a particular rule. The rules are specified by comma-separated rule IDs.
|
102
104
|
|
103
105
|
``` gherkin
|
104
|
-
Then the page should be
|
106
|
+
Then the page should be axe clean skipping: ruleId
|
105
107
|
```
|
106
108
|
|
107
109
|
*see [rules documentation][rules] for a list of valid rule IDs*
|
@@ -109,8 +111,8 @@ Then the page should be accessible skipping: ruleId
|
|
109
111
|
If desired, a semicolon ( `;` ) or the word `but` may be used to separate the skipping-rules clause from the preceding clause.
|
110
112
|
|
111
113
|
``` gherkin
|
112
|
-
Then the page should be
|
113
|
-
Then the page should be
|
114
|
+
Then the page should be axe clean according to: wcag2a; skipping: accesskeys
|
115
|
+
Then the page should be axe clean according to: wcag2a but skipping: accesskeys
|
114
116
|
```
|
115
117
|
|
116
118
|
##### Interoperability between clauses
|
@@ -118,13 +120,13 @@ Then the page should be accessible according to: wcag2a but skipping: accesskeys
|
|
118
120
|
All of the described clauses may be mixed and matched with method chaining. Below are some examples.
|
119
121
|
|
120
122
|
``` gherkin
|
121
|
-
Then the page should be
|
123
|
+
Then the page should be axe clean within "main, header" but excluding "footer"
|
122
124
|
|
123
|
-
Then the page should be
|
125
|
+
Then the page should be axe clean excluding "#sidebar" according to: wcag2a, wcag2aa but skipping: color-contrast
|
124
126
|
|
125
|
-
Then the page should be
|
127
|
+
Then the page should be axe clean checking only: document-title, label
|
126
128
|
|
127
|
-
Then the page should be
|
129
|
+
Then the page should be axe clean according to: best-practice and checking: aria-roles, definition-list
|
128
130
|
```
|
129
131
|
|
130
132
|
[inclusion-clause]: #inclusion-clause
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "yaml"
|
2
2
|
|
3
|
-
require "axe/matchers/
|
3
|
+
require "axe/matchers/be_axe_clean"
|
4
4
|
require "axe/finds_page"
|
5
5
|
require "axe/expectation"
|
6
6
|
|
@@ -16,7 +16,7 @@ module AxeCucumber
|
|
16
16
|
# Extracting regex into variable to allow for easier consumption elsewhere
|
17
17
|
###############
|
18
18
|
# require initial phrasing, with 'not' to negate the matcher
|
19
|
-
REGEX_CAPTURE_NEGATE = "(?-x:the page should( not)? be
|
19
|
+
REGEX_CAPTURE_NEGATE = "(?-x:the page should( not)? be axe clean)"
|
20
20
|
# optionally specify which subtree to check, via CSS selector
|
21
21
|
REGEX_CAPTURE_INCLUSION = '(?-x:;? within "(.*?)")?'
|
22
22
|
# optionally specify subtrees to be excluded, via CSS selector
|
@@ -52,7 +52,7 @@ module AxeCucumber
|
|
52
52
|
skip_rules = "",
|
53
53
|
options = nil
|
54
54
|
)
|
55
|
-
|
55
|
+
is_axe_clean = Axe::Matchers::BeAxeClean.new.tap do |a|
|
56
56
|
a.within(*selector(inclusion))
|
57
57
|
a.excluding(*selector(exclusion))
|
58
58
|
a.according_to(*split(tags))
|
@@ -62,7 +62,7 @@ module AxeCucumber
|
|
62
62
|
a.with_options to_hash(options)
|
63
63
|
end
|
64
64
|
|
65
|
-
Axe::AccessibilityExpectation.create(negate).assert @page,
|
65
|
+
Axe::AccessibilityExpectation.create(negate).assert @page, is_axe_clean
|
66
66
|
end
|
67
67
|
|
68
68
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axe-core-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.1.pre.
|
4
|
+
version: 2.6.1.pre.b702a53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deque Systems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|
@@ -131,8 +131,8 @@ extra_rdoc_files: []
|
|
131
131
|
files:
|
132
132
|
- LICENSE
|
133
133
|
- README.md
|
134
|
-
- lib/axe-
|
135
|
-
- lib/axe-
|
134
|
+
- lib/axe-cucumber-steps.rb
|
135
|
+
- lib/axe-cucumber.rb
|
136
136
|
homepage: https://www.deque.com
|
137
137
|
licenses: []
|
138
138
|
metadata:
|