testaro 32.0.2 → 32.0.3

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
@@ -243,7 +243,7 @@ Testaro helps overcome this format diversity by offering to represent the main f
243
243
 
244
244
  In the conceptual scheme underlying the format standardization of Testaro, each tool has its own set of _rules_, where a rule is an algorithm for evaluating a target and determining whether instances of some kind of problem exist in it. With standardization, Testaro reports, in a uniform way, the outcomes from the application of rules by tools to a target.
245
245
 
246
- Each job can specify how Testaro is to handle report standardization. A job can contain a `standard` property. If the value of that property is `'also'` or `'only'`, Testaro converts some data in each tool report to the standard format. That permits you to ignore the format idiosyncrasies of the tools. If `standard` has the value `'also'`, the job report includes both formats. If the value is `'only'`, the job report includes only the standard format. If the value is `'no'` (or anything else, or there is no `standard` property), the job report includes only the original format of each tool report.
246
+ Each job can specify how Testaro is to handle report standardization. A job can contain a `standard` property. If the value of that property is `'also'` or `'only'`, Testaro converts some data in each tool report to the standard format. That permits you to ignore the format idiosyncrasies of the tools. If `standard` has the value `'also'`, the job report includes both formats. If the value is `'only'`, or there is no value, the job report includes only the standard format. If the value is `'no'`, the job report includes only the original format of each tool report.
247
247
 
248
248
  The standard format of each tool report has these properties:
249
249
  - `prevented`: `true` if the tool failed to run on the page, or otherwise omitted.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "32.0.2",
3
+ "version": "32.0.3",
4
4
  "description": "Run 960 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -1055,28 +1055,28 @@ const doActs = async (report, actIndex, page) => {
1055
1055
  // Remove it.
1056
1056
  delete act.result;
1057
1057
  }
1058
- // If the act has expectations:
1059
- const expectations = act.expect;
1060
- if (expectations) {
1061
- // Initialize whether they were fulfilled.
1062
- act.expectations = [];
1063
- let failureCount = 0;
1064
- // For each expectation:
1065
- expectations.forEach(spec => {
1066
- const truth = isTrue(act, spec);
1067
- act.expectations.push({
1068
- property: spec[0],
1069
- relation: spec[1],
1070
- criterion: spec[2],
1071
- actual: truth[0],
1072
- passed: truth[1]
1073
- });
1074
- if (! truth[1]) {
1075
- failureCount++;
1076
- }
1058
+ }
1059
+ // If the act has expectations:
1060
+ const expectations = act.expect;
1061
+ if (expectations) {
1062
+ // Initialize whether they were fulfilled.
1063
+ act.expectations = [];
1064
+ let failureCount = 0;
1065
+ // For each expectation:
1066
+ expectations.forEach(spec => {
1067
+ const truth = isTrue(act, spec);
1068
+ act.expectations.push({
1069
+ property: spec[0],
1070
+ relation: spec[1],
1071
+ criterion: spec[2],
1072
+ actual: truth[0],
1073
+ passed: truth[1]
1077
1074
  });
1078
- act.expectationFailures = failureCount;
1079
- }
1075
+ if (! truth[1]) {
1076
+ failureCount++;
1077
+ }
1078
+ });
1079
+ act.expectationFailures = failureCount;
1080
1080
  }
1081
1081
  }
1082
1082
  // Otherwise, if the act is a move:
@@ -3,6 +3,7 @@
3
3
  "what": "validation of elements test",
4
4
  "strict": true,
5
5
  "timeLimit": 20,
6
+ "standard": "no",
6
7
  "acts": [
7
8
  {
8
9
  "type": "launch",
@@ -16,7 +17,7 @@
16
17
  "stopOnFail": true,
17
18
  "expect": [
18
19
  [
19
- "result.rules.elements.data.total",
20
+ "result.elements.data.total",
20
21
  "=",
21
22
  21
22
23
  ]
@@ -36,7 +37,7 @@
36
37
  "stopOnFail": true,
37
38
  "expect": [
38
39
  [
39
- "result.rules.elements.data.total",
40
+ "result.elements.data.total",
40
41
  "=",
41
42
  5
42
43
  ]
@@ -56,7 +57,7 @@
56
57
  "stopOnFail": true,
57
58
  "expect": [
58
59
  [
59
- "result.rules.elements.data.total",
60
+ "result.elements.data.total",
60
61
  "=",
61
62
  2
62
63
  ]
@@ -77,7 +78,7 @@
77
78
  "stopOnFail": true,
78
79
  "expect": [
79
80
  [
80
- "result.rules.elements.data.total",
81
+ "result.elements.data.total",
81
82
  "=",
82
83
  2
83
84
  ]
@@ -98,37 +99,37 @@
98
99
  "stopOnFail": true,
99
100
  "expect": [
100
101
  [
101
- "result.rules.elements.data.total",
102
+ "result.elements.data.total",
102
103
  "=",
103
104
  1
104
105
  ],
105
106
  [
106
- "result.rules.elements.data.items.0.tagName",
107
+ "result.elements.data.items.0.tagName",
107
108
  "=",
108
109
  "LI"
109
110
  ],
110
111
  [
111
- "result.rules.elements.data.items.0.parentTagName",
112
+ "result.elements.data.items.0.parentTagName",
112
113
  "=",
113
114
  "UL"
114
115
  ],
115
116
  [
116
- "result.rules.elements.data.items.0.code",
117
+ "result.elements.data.items.0.code",
117
118
  "i",
118
119
  "first"
119
120
  ],
120
121
  [
121
- "result.rules.elements.data.items.0.attributes.0.name",
122
+ "result.elements.data.items.0.attributes.0.name",
122
123
  "=",
123
124
  "class"
124
125
  ],
125
126
  [
126
- "result.rules.elements.data.items.0.attributes.0.value",
127
+ "result.elements.data.items.0.attributes.0.value",
127
128
  "=",
128
129
  "first"
129
130
  ],
130
131
  [
131
- "result.rules.elements.data.items.0.textContent",
132
+ "result.elements.data.items.0.textContent",
132
133
  "=",
133
134
  "Io"
134
135
  ]
@@ -149,17 +150,17 @@
149
150
  "stopOnFail": true,
150
151
  "expect": [
151
152
  [
152
- "result.rules.elements.data.total",
153
+ "result.elements.data.total",
153
154
  "=",
154
155
  2
155
156
  ],
156
157
  [
157
- "result.rules.elements.data.items.0.labels.1",
158
+ "result.elements.data.items.0.labels.1",
158
159
  "i",
159
160
  "anything"
160
161
  ],
161
162
  [
162
- "result.rules.elements.data.items.1.labelers.0",
163
+ "result.elements.data.items.1.labelers.0",
163
164
  "i",
164
165
  "something else"
165
166
  ]
@@ -180,12 +181,12 @@
180
181
  "stopOnFail": true,
181
182
  "expect": [
182
183
  [
183
- "result.rules.elements.data.items.0.textContent",
184
+ "result.elements.data.items.0.textContent",
184
185
  "=",
185
186
  "Io"
186
187
  ],
187
188
  [
188
- "result.rules.elements.data.items.0.parentTextContent",
189
+ "result.elements.data.items.0.parentTextContent",
189
190
  "i",
190
191
  "tute"
191
192
  ]
@@ -207,17 +208,17 @@
207
208
  "stopOnFail": true,
208
209
  "expect": [
209
210
  [
210
- "result.rules.elements.data.total",
211
+ "result.elements.data.total",
211
212
  "=",
212
213
  1
213
214
  ],
214
215
  [
215
- "result.rules.elements.data.items.0.parentTextContent",
216
+ "result.elements.data.items.0.parentTextContent",
216
217
  "i",
217
218
  "alia"
218
219
  ],
219
220
  [
220
- "result.rules.elements.data.items.0.parentTextContent",
221
+ "result.elements.data.items.0.parentTextContent",
221
222
  "i",
222
223
  "tute"
223
224
  ]
@@ -238,47 +239,47 @@
238
239
  "stopOnFail": true,
239
240
  "expect": [
240
241
  [
241
- "result.rules.elements.data.items.0.textContent",
242
+ "result.elements.data.items.0.textContent",
242
243
  "=",
243
244
  "This is a paragraph."
244
245
  ],
245
246
  [
246
- "result.rules.elements.data.items.0.parentTagName",
247
+ "result.elements.data.items.0.parentTagName",
247
248
  "=",
248
249
  "MAIN"
249
250
  ],
250
251
  [
251
- "result.rules.elements.data.items.0.parentTextContent",
252
+ "result.elements.data.items.0.parentTextContent",
252
253
  "i",
253
254
  "something."
254
255
  ],
255
256
  [
256
- "result.rules.elements.data.items.0.siblings.before.0.type",
257
+ "result.elements.data.items.0.siblings.before.0.type",
257
258
  "=",
258
259
  3
259
260
  ],
260
261
  [
261
- "result.rules.elements.data.items.0.siblings.before.1.type",
262
+ "result.elements.data.items.0.siblings.before.1.type",
262
263
  "=",
263
264
  1
264
265
  ],
265
266
  [
266
- "result.rules.elements.data.items.0.siblings.before.1.tagName",
267
+ "result.elements.data.items.0.siblings.before.1.tagName",
267
268
  "=",
268
269
  "H1"
269
270
  ],
270
271
  [
271
- "result.rules.elements.data.items.0.siblings.after.12.type",
272
+ "result.elements.data.items.0.siblings.after.12.type",
272
273
  "=",
273
274
  1
274
275
  ],
275
276
  [
276
- "result.rules.elements.data.items.0.siblings.after.12.tagName",
277
+ "result.elements.data.items.0.siblings.after.12.tagName",
277
278
  "=",
278
279
  "LABEL"
279
280
  ],
280
281
  [
281
- "result.rules.elements.data.items.0.siblings.after.12.attributes.0.name",
282
+ "result.elements.data.items.0.siblings.after.12.attributes.0.name",
282
283
  "=",
283
284
  "for"
284
285
  ]
@@ -56,7 +56,7 @@ exports.validateTest = async testID => {
56
56
  if (
57
57
  testActs.length === report.acts.filter(act => act.type === 'test').length
58
58
  && testActs.every(
59
- testAct => testAct.standardResult && testAct.expectationFailures !== undefined
59
+ testAct => testAct.expectationFailures !== undefined
60
60
  )
61
61
  ) {
62
62
  // Report this.