testaro 4.2.1 → 4.2.4

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.
package/README.md CHANGED
@@ -258,6 +258,28 @@ The `tenon` test requires two commands:
258
258
  - A command of type `tenonRequest`.
259
259
  - A command of type `test` with `tenon` as the value of `which`.
260
260
 
261
+ Example:
262
+
263
+ ```json
264
+ {
265
+ "type": "tenonRequest",
266
+ "id": "a",
267
+ "withNewContent": true,
268
+ "what": "Tenon API version 2 test request"
269
+ }
270
+ ```
271
+
272
+ followed by
273
+
274
+ ```json
275
+ {
276
+ "type": "test",
277
+ "which": "tenon",
278
+ "id": "a",
279
+ "what": "Tenon API version 2 result retrieval"
280
+ }
281
+ ```
282
+
261
283
  The reason for this is that the Tenon API operates asynchronously. You ask it to perform a test, and it puts your request into a queue. To learn whether Tenon has completed your test, you make a status request. You can continue making status requests until Tenon replies that your test has been completed. Then you submit a request for the test result, and Tenon replies with the result. (As of May 2022, status requests were observed to misreport still-running tests as completed. The `tenon` test works around that.)
262
284
 
263
285
  Tenon says that tests are typically completed in 3 to 6 seconds but that the latency can be longer, depending on demand.
package/commands.js CHANGED
@@ -104,13 +104,6 @@ exports.commands = {
104
104
  what: [false, 'string', 'isState', 'comment']
105
105
  }
106
106
  ],
107
- test: [
108
- 'Perform a test',
109
- {
110
- which: [true, 'string', 'isTest', 'test name'],
111
- what: [false, 'string', 'hasLength', 'comment']
112
- }
113
- ],
114
107
  tenonRequest: [
115
108
  'Request a Tenon test',
116
109
  {
@@ -119,6 +112,13 @@ exports.commands = {
119
112
  what: [false, 'string', 'hasLength', 'comment']
120
113
  }
121
114
  ],
115
+ test: [
116
+ 'Perform a test',
117
+ {
118
+ which: [true, 'string', 'isTest', 'test name'],
119
+ what: [false, 'string', 'hasLength', 'comment']
120
+ }
121
+ ],
122
122
  text: [
123
123
  'Enter text into a text input, optionally with 1 placeholder for an all-caps literal environment variable',
124
124
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "4.2.1",
3
+ "version": "4.2.4",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "railpass",
3
+ "what": "Railpass",
4
+ "hosts": [
5
+ {
6
+ "id": "railpass",
7
+ "which": "https://www.railpass.com/",
8
+ "what": "Railpass"
9
+ }
10
+ ]
11
+ }
@@ -17,13 +17,13 @@
17
17
  "type": "tenonRequest",
18
18
  "withNewContent": true,
19
19
  "id": "a",
20
- "what": "tenon request"
20
+ "what": "Tenon API version 2 test request"
21
21
  },
22
22
  {
23
23
  "type": "test",
24
24
  "which": "tenon",
25
25
  "id": "a",
26
- "what": "result of prior tenon request"
26
+ "what": "Tenon API version 2 result retrieval"
27
27
  }
28
28
  ]
29
29
  }
@@ -0,0 +1,146 @@
1
+ {
2
+ "id": "asp09",
3
+ "what": "AATT, Alfa, Axe, IBM, WAVE, and 16 custom tests",
4
+ "strict": true,
5
+ "commands": [
6
+ {
7
+ "type": "launch",
8
+ "which": "webkit",
9
+ "what": "used for tests on which chromium fails on some URLs"
10
+ },
11
+ {
12
+ "type": "url",
13
+ "which": "https://*",
14
+ "what": "any page"
15
+ },
16
+ {
17
+ "type": "test",
18
+ "which": "motion",
19
+ "what": "spontaneous change of content",
20
+ "delay": 2400,
21
+ "interval": 2600,
22
+ "count": 5
23
+ },
24
+ {
25
+ "type": "test",
26
+ "which": "axe",
27
+ "withItems": true,
28
+ "rules": [],
29
+ "what": "Axe core, all rules"
30
+ },
31
+ {
32
+ "type": "launch",
33
+ "which": "chromium",
34
+ "what": "used for most tests"
35
+ },
36
+ {
37
+ "type": "url",
38
+ "which": "https://*",
39
+ "what": "any page"
40
+ },
41
+ {
42
+ "type": "test",
43
+ "which": "bulk",
44
+ "what": "count of visible elements"
45
+ },
46
+ {
47
+ "type": "test",
48
+ "which": "embAc",
49
+ "what": "active elements incorrectly embedded in each other",
50
+ "withItems": true
51
+ },
52
+ {
53
+ "type": "test",
54
+ "which": "focAll",
55
+ "what": "Tab-focusability"
56
+ },
57
+ {
58
+ "type": "test",
59
+ "which": "focInd",
60
+ "what": "focus indicators",
61
+ "withItems": true,
62
+ "revealAll": true
63
+ },
64
+ {
65
+ "type": "test",
66
+ "which": "focOp",
67
+ "what": "focusability and operability of elements",
68
+ "withItems": true
69
+ },
70
+ {
71
+ "type": "test",
72
+ "which": "hover",
73
+ "what": "hover-triggered content changes",
74
+ "withItems": true
75
+ },
76
+ {
77
+ "type": "test",
78
+ "which": "labClash",
79
+ "what": "unlabeled and mislabeled form controls",
80
+ "withItems": true
81
+ },
82
+ {
83
+ "type": "test",
84
+ "which": "linkUl",
85
+ "what": "underlining of inline links",
86
+ "withItems": true
87
+ },
88
+ {
89
+ "type": "test",
90
+ "which": "menuNav",
91
+ "what": "keyboard navigation within true-focus menus",
92
+ "withItems": true
93
+ },
94
+ {
95
+ "type": "test",
96
+ "which": "radioSet",
97
+ "what": "grouping of radio buttons in fieldsets",
98
+ "withItems": true
99
+ },
100
+ {
101
+ "type": "test",
102
+ "which": "role",
103
+ "what": "validity and necessity of role assignments"
104
+ },
105
+ {
106
+ "type": "test",
107
+ "which": "styleDiff",
108
+ "what": "style consistency of headings, buttons, and links",
109
+ "withItems": true
110
+ },
111
+ {
112
+ "type": "test",
113
+ "which": "tabNav",
114
+ "what": "keyboard navigation within tab lists",
115
+ "withItems": true
116
+ },
117
+ {
118
+ "type": "test",
119
+ "which": "zIndex",
120
+ "what": "elements with non-auto z indexes",
121
+ "withItems": true
122
+ },
123
+ {
124
+ "type": "test",
125
+ "which": "ibm",
126
+ "withItems": true,
127
+ "what": "IBM Accessibility Checker"
128
+ },
129
+ {
130
+ "type": "test",
131
+ "which": "aatt",
132
+ "what": "AATT with HTML CodeSniffer"
133
+ },
134
+ {
135
+ "type": "test",
136
+ "which": "alfa",
137
+ "what": "Siteimprove alfa"
138
+ },
139
+ {
140
+ "type": "test",
141
+ "which": "wave",
142
+ "reportType": 4,
143
+ "what": "WAVE, report-type 4"
144
+ }
145
+ ]
146
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "id": "asp10",
3
+ "what": "AATT, Alfa, Axe, IBM, Tenon, WAVE, and 16 custom tests",
4
+ "strict": true,
5
+ "commands": [
6
+ {
7
+ "type": "launch",
8
+ "which": "webkit",
9
+ "what": "used for tests on which chromium fails on some URLs"
10
+ },
11
+ {
12
+ "type": "url",
13
+ "which": "https://*",
14
+ "what": "any page"
15
+ },
16
+ {
17
+ "type": "tenonRequest",
18
+ "id": "a",
19
+ "withNewContent": true,
20
+ "what": "Tenon API version 2 test request"
21
+ },
22
+ {
23
+ "type": "test",
24
+ "which": "motion",
25
+ "what": "spontaneous change of content",
26
+ "delay": 2400,
27
+ "interval": 2600,
28
+ "count": 5
29
+ },
30
+ {
31
+ "type": "test",
32
+ "which": "axe",
33
+ "withItems": true,
34
+ "rules": [],
35
+ "what": "Axe core, all rules"
36
+ },
37
+ {
38
+ "type": "launch",
39
+ "which": "chromium",
40
+ "what": "used for most tests"
41
+ },
42
+ {
43
+ "type": "url",
44
+ "which": "https://*",
45
+ "what": "any page"
46
+ },
47
+ {
48
+ "type": "test",
49
+ "which": "bulk",
50
+ "what": "count of visible elements"
51
+ },
52
+ {
53
+ "type": "test",
54
+ "which": "embAc",
55
+ "what": "active elements incorrectly embedded in each other",
56
+ "withItems": true
57
+ },
58
+ {
59
+ "type": "test",
60
+ "which": "focAll",
61
+ "what": "Tab-focusability"
62
+ },
63
+ {
64
+ "type": "test",
65
+ "which": "focInd",
66
+ "what": "focus indicators",
67
+ "withItems": true,
68
+ "revealAll": true
69
+ },
70
+ {
71
+ "type": "test",
72
+ "which": "focOp",
73
+ "what": "focusability and operability of elements",
74
+ "withItems": true
75
+ },
76
+ {
77
+ "type": "test",
78
+ "which": "hover",
79
+ "what": "hover-triggered content changes",
80
+ "withItems": true
81
+ },
82
+ {
83
+ "type": "test",
84
+ "which": "labClash",
85
+ "what": "unlabeled and mislabeled form controls",
86
+ "withItems": true
87
+ },
88
+ {
89
+ "type": "test",
90
+ "which": "linkUl",
91
+ "what": "underlining of inline links",
92
+ "withItems": true
93
+ },
94
+ {
95
+ "type": "test",
96
+ "which": "menuNav",
97
+ "what": "keyboard navigation within true-focus menus",
98
+ "withItems": true
99
+ },
100
+ {
101
+ "type": "test",
102
+ "which": "radioSet",
103
+ "what": "grouping of radio buttons in fieldsets",
104
+ "withItems": true
105
+ },
106
+ {
107
+ "type": "test",
108
+ "which": "role",
109
+ "what": "validity and necessity of role assignments"
110
+ },
111
+ {
112
+ "type": "test",
113
+ "which": "styleDiff",
114
+ "what": "style consistency of headings, buttons, and links",
115
+ "withItems": true
116
+ },
117
+ {
118
+ "type": "test",
119
+ "which": "tabNav",
120
+ "what": "keyboard navigation within tab lists",
121
+ "withItems": true
122
+ },
123
+ {
124
+ "type": "test",
125
+ "which": "zIndex",
126
+ "what": "elements with non-auto z indexes",
127
+ "withItems": true
128
+ },
129
+ {
130
+ "type": "test",
131
+ "which": "ibm",
132
+ "withItems": true,
133
+ "what": "IBM Accessibility Checker"
134
+ },
135
+ {
136
+ "type": "test",
137
+ "which": "aatt",
138
+ "what": "AATT with HTML CodeSniffer"
139
+ },
140
+ {
141
+ "type": "test",
142
+ "which": "alfa",
143
+ "what": "Siteimprove alfa"
144
+ },
145
+ {
146
+ "type": "test",
147
+ "which": "wave",
148
+ "reportType": 4,
149
+ "what": "WAVE, report-type 4"
150
+ },
151
+ {
152
+ "type": "test",
153
+ "which": "tenon",
154
+ "id": "a",
155
+ "what": "Tenon API version 2 result retrieval"
156
+ }
157
+ ]
158
+ }
package/tests/ibm.js CHANGED
@@ -30,23 +30,29 @@ const run = async content => {
30
30
  // Reports the result of an IBM test.
31
31
  const report = (result, withItems) => {
32
32
  const data = {};
33
- if (result) {
34
- data.totals = result.report.summary.counts;
35
- if (withItems) {
36
- data.items = result.report.results;
37
- data.items.forEach(item => {
38
- delete item.apiArgs;
39
- delete item.category;
40
- delete item.ignored;
41
- delete item.messageArgs;
42
- delete item.reasonId;
43
- delete item.ruleTime;
44
- delete item.value;
45
- });
33
+ if (result && result.report && result.report.summary) {
34
+ const totals = result.report.summary.counts;
35
+ if (totals) {
36
+ data.totals = totals;
37
+ if (withItems) {
38
+ data.items = result.report.results;
39
+ data.items.forEach(item => {
40
+ delete item.apiArgs;
41
+ delete item.category;
42
+ delete item.ignored;
43
+ delete item.messageArgs;
44
+ delete item.reasonId;
45
+ delete item.ruleTime;
46
+ delete item.value;
47
+ });
48
+ }
49
+ }
50
+ else {
51
+ data.error = 'ERROR: ibm test delivered no totals';
46
52
  }
47
53
  }
48
54
  else {
49
- data.error = 'ERROR: ibm test failed';
55
+ data.error = 'ERROR: ibm test delivered no report summary';
50
56
  }
51
57
  return data;
52
58
  };