testaro 16.0.0 → 16.2.0

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.
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "type": "launch",
9
9
  "which": "chromium",
10
- "what": "usual browser"
10
+ "what": "only compatible browser"
11
11
  },
12
12
  {
13
13
  "type": "url",
@@ -17,7 +17,6 @@
17
17
  {
18
18
  "type": "test",
19
19
  "which": "testaro",
20
- "what": "hover",
21
20
  "withItems": true,
22
21
  "expect": [
23
22
  [
@@ -52,78 +51,132 @@
52
51
  {
53
52
  "type": "test",
54
53
  "which": "testaro",
55
- "what": "hover",
56
54
  "withItems": true,
57
55
  "expect": [
58
56
  [
59
57
  "standardResult.totals.3",
60
- "=",
61
- 4
58
+ ">",
59
+ 0
62
60
  ],
63
61
  [
64
- "standardResult.totals.2",
62
+ "standardResult.instances.0.ruleID",
65
63
  "=",
66
- 1
64
+ "hover"
67
65
  ],
68
66
  [
69
- "standardResult.totals.1",
67
+ "standardResult.instances.length",
70
68
  "=",
71
69
  4
72
70
  ],
73
71
  [
74
- "standardResult.totals.0",
72
+ "standardResult.instances.0.what",
73
+ "i",
74
+ "over the element"
75
+ ],
76
+ [
77
+ "standardResult.instances.0.tagName",
75
78
  "=",
76
- 1
79
+ "A"
77
80
  ],
78
81
  [
79
- "standardResult.instances.0.ruleID",
82
+ "standardResult.instances.0.location.doc",
80
83
  "=",
81
- "hover"
84
+ "dom"
82
85
  ],
83
86
  [
84
- "standardResult.instances.0.what",
87
+ "standardResult.instances.0.location.type",
88
+ "=",
89
+ "box"
90
+ ],
91
+ [
92
+ "standardResult.instances.0.location.spec.height",
93
+ "<",
94
+ "20"
95
+ ],
96
+ [
97
+ "standardResult.instances.0.excerpt",
85
98
  "i",
86
- "unexpected"
99
+ "Trigger 1"
87
100
  ],
88
101
  [
89
- "standardResult.instances.0.ordinalSeverity",
102
+ "standardResult.instances.2.what",
103
+ "i",
104
+ "is not hoverable"
105
+ ],
106
+ [
107
+ "standardResult.instances.2.ordinalSeverity",
90
108
  "=",
91
109
  3
92
110
  ],
93
111
  [
94
- "standardResult.instances.0.tagName",
112
+ "standardResult.instances.2.tagName",
95
113
  "=",
96
- "A"
114
+ "BUTTON"
97
115
  ],
98
116
  [
99
- "standardResult.instances.0.excerpt",
117
+ "standardResult.instances.2.id",
118
+ "=",
119
+ "smallButton"
120
+ ],
121
+ [
122
+ "standardResult.instances.2.location.doc",
123
+ "=",
124
+ "dom"
125
+ ],
126
+ [
127
+ "standardResult.instances.2.location.type",
128
+ "=",
129
+ "selector"
130
+ ],
131
+ [
132
+ "standardResult.instances.2.location.spec",
133
+ "=",
134
+ "#smallButton"
135
+ ],
136
+ [
137
+ "standardResult.instances.2.excerpt",
100
138
  "i",
101
- "Trigger 1"
139
+ "Trigger 3"
102
140
  ],
103
141
  [
104
142
  "standardResult.instances.3.what",
105
143
  "i",
106
- "cannot be hovered"
144
+ "over the element"
107
145
  ],
108
146
  [
109
147
  "standardResult.instances.3.ordinalSeverity",
110
- "=",
111
- 3
148
+ ">",
149
+ -1
112
150
  ],
113
151
  [
114
152
  "standardResult.instances.3.tagName",
115
153
  "=",
116
- "BUTTON"
154
+ "LI"
117
155
  ],
118
156
  [
119
157
  "standardResult.instances.3.id",
120
158
  "=",
121
- "smallButton"
159
+ ""
160
+ ],
161
+ [
162
+ "standardResult.instances.3.location.doc",
163
+ "=",
164
+ "dom"
165
+ ],
166
+ [
167
+ "standardResult.instances.3.location.type",
168
+ "=",
169
+ "box"
170
+ ],
171
+ [
172
+ "standardResult.instances.3.location.spec.x",
173
+ ">",
174
+ 0
122
175
  ],
123
176
  [
124
177
  "standardResult.instances.3.excerpt",
125
178
  "i",
126
- "Trigger 3"
179
+ "item, Trigger 5"
127
180
  ]
128
181
  ],
129
182
  "rules": [
@@ -131,39 +184,23 @@
131
184
  "hover"
132
185
  ],
133
186
  "args": {
134
- "hover": [6]
187
+ "hover": [8]
135
188
  }
136
189
  },
137
190
  {
138
191
  "type": "test",
139
192
  "which": "testaro",
140
- "what": "hover",
141
193
  "withItems": false,
142
194
  "expect": [
143
195
  [
144
196
  "standardResult.totals.3",
145
- "=",
146
- 4
147
- ],
148
- [
149
- "standardResult.totals.2",
150
- "=",
151
- 1
152
- ],
153
- [
154
- "standardResult.totals.1",
155
- "=",
156
- 4
157
- ],
158
- [
159
- "standardResult.totals.0",
160
- "=",
161
- 1
197
+ ">",
198
+ 0
162
199
  ],
163
200
  [
164
201
  "standardResult.instances.length",
165
- "=",
166
- 1
202
+ ">",
203
+ 0
167
204
  ],
168
205
  [
169
206
  "standardResult.instances.0.ruleID",
@@ -173,17 +210,17 @@
173
210
  [
174
211
  "standardResult.instances.0.what",
175
212
  "i",
176
- "behaves"
213
+ "over elements"
177
214
  ],
178
215
  [
179
216
  "standardResult.instances.0.ordinalSeverity",
180
- "=",
181
- 3
217
+ ">",
218
+ -1
182
219
  ],
183
220
  [
184
221
  "standardResult.instances.0.count",
185
- "=",
186
- 10
222
+ ">",
223
+ 0
187
224
  ]
188
225
  ],
189
226
  "rules": [
@@ -191,13 +228,12 @@
191
228
  "hover"
192
229
  ],
193
230
  "args": {
194
- "hover": [6]
231
+ "hover": [8]
195
232
  }
196
233
  },
197
234
  {
198
235
  "type": "test",
199
236
  "which": "testaro",
200
- "what": "hover",
201
237
  "withItems": false,
202
238
  "expect": [
203
239
  [
@@ -228,96 +264,6 @@
228
264
  "args": {
229
265
  "hover": [2]
230
266
  }
231
- },
232
- {
233
- "type": "url",
234
- "which": "__targets__/hover/styleBad.html",
235
- "what": "page with deviant trigger styles"
236
- },
237
- {
238
- "type": "test",
239
- "which": "testaro",
240
- "what": "hover",
241
- "withItems": true,
242
- "expect": [
243
- [
244
- "standardResult.totals.1",
245
- "=",
246
- 0
247
- ],
248
- [
249
- "standardResult.totals.2",
250
- "=",
251
- 2
252
- ],
253
- [
254
- "standardResult.totals.3",
255
- "=",
256
- 1
257
- ],
258
- [
259
- "standardResult.instances.0.ruleID",
260
- "=",
261
- "hover"
262
- ],
263
- [
264
- "standardResult.instances.0.what",
265
- "i",
266
- "hides"
267
- ],
268
- [
269
- "standardResult.instances.0.tagName",
270
- "=",
271
- "LI"
272
- ],
273
- [
274
- "standardResult.instances.0.ordinalSeverity",
275
- "=",
276
- 3
277
- ],
278
- [
279
- "standardResult.instances.0.excerpt",
280
- "i",
281
- "loses its cursor"
282
- ],
283
- [
284
- "standardResult.instances.1.ruleID",
285
- "=",
286
- "hover"
287
- ],
288
- [
289
- "standardResult.instances.1.what",
290
- "i",
291
- "cursor nonstandard"
292
- ],
293
- [
294
- "standardResult.instances.1.tagName",
295
- "=",
296
- "A"
297
- ],
298
- [
299
- "standardResult.instances.1.id",
300
- "=",
301
- "trigger1"
302
- ],
303
- [
304
- "standardResult.instances.1.ordinalSeverity",
305
- "=",
306
- 2
307
- ],
308
- [
309
- "standardResult.instances.1.excerpt",
310
- "i",
311
- "Trigger 1"
312
- ]
313
- ],
314
- "rules": [
315
- "y",
316
- "hover"
317
- ],
318
- "args": {
319
- "hover": [4]
320
- }
321
267
  }
322
268
  ],
323
269
  "sources": {
@@ -18,11 +18,26 @@
18
18
  "type": "test",
19
19
  "which": "testaro",
20
20
  "expect": [
21
+ [
22
+ "standardResult.totals.0",
23
+ "=",
24
+ 0
25
+ ],
26
+ [
27
+ "standardResult.totals.1",
28
+ "=",
29
+ 0
30
+ ],
21
31
  [
22
32
  "standardResult.totals.2",
23
33
  "=",
24
34
  0
25
35
  ],
36
+ [
37
+ "standardResult.totals.3",
38
+ "=",
39
+ 0
40
+ ],
26
41
  [
27
42
  "standardResult.instances.length",
28
43
  "=",
@@ -33,10 +48,7 @@
33
48
  "rules": [
34
49
  "y",
35
50
  "motion"
36
- ],
37
- "args": {
38
- "motion": [2400, 2600, 5]
39
- }
51
+ ]
40
52
  },
41
53
  {
42
54
  "type": "url",
@@ -48,16 +60,6 @@
48
60
  "which": "testaro",
49
61
  "what": "spontaneous change of content",
50
62
  "expect": [
51
- [
52
- "standardResult.totals.2",
53
- ">",
54
- 0
55
- ],
56
- [
57
- "standardResult.totals.3",
58
- "=",
59
- 0
60
- ],
61
63
  [
62
64
  "standardResult.instances.length",
63
65
  "=",
@@ -72,16 +74,23 @@
72
74
  "standardResult.instances.0.what",
73
75
  "i",
74
76
  "moves or changes"
77
+ ],
78
+ [
79
+ "standardResult.instances.0.ordinalSeverity",
80
+ ">",
81
+ -1
82
+ ],
83
+ [
84
+ "standardResult.instances.0.tagName",
85
+ "=",
86
+ "HTML"
75
87
  ]
76
88
  ],
77
89
  "withItems": true,
78
90
  "rules": [
79
91
  "y",
80
92
  "motion"
81
- ],
82
- "args": {
83
- "motion": [2400, 2600, 5]
84
- }
93
+ ]
85
94
  }
86
95
  ],
87
96
  "sources": {
@@ -13,28 +13,29 @@
13
13
 
14
14
  <p>Triggers 1 and 2. This page contains a link named <a href="https://en.wikipedia.org" onmouseover="document.getElementById('translucent').style.opacity = 1">Trigger 1</a> and a <button type="button" onmouseover="document.getElementById('hiddenP').style.display = 'block'">Trigger 2 button</button>. Both elements can be hovered over.</p>
15
15
 
16
- <p id="hiddenP" style="display: none">The Trigger 2 button, when hovered over, makes this paragraph, and therefore this <a href="https://en.wikipedia.org/wiki/Web_accessibility">link on web accessibility</a> and this <button type="button">new button</button>, visible. 3 additions.</p>
16
+ <p id="hiddenP" style="display: none">The Trigger 2 button, when hovered over, makes this paragraph, and therefore this <a href="https://en.wikipedia.org/wiki/Web_accessibility">link on web accessibility</a> and this <button type="button">new button</button>, visible.</p>
17
17
 
18
18
  <p id="translucent" style="opacity: 0.4">The Trigger 1 link, when hovered over, changes the opacity of this paragraph from 0.4 to 1. That indirectly changes the opacity of this <span>word</span>, too.</p>
19
19
 
20
- <p>The Trigger 3 button is mostly covered by a Trigger 4 one below, preventing the Trigger 3 button from receiving a hover event.</p>
20
+ <p>The Trigger 3 button is mostly covered by a Trigger 4 button below, preventing the Trigger 3 button from receiving a hover event.</p>
21
21
 
22
22
  <p style="position: relative"><button id="smallButton" style="position: absolute; left: 10rem">Trigger 3</button><button style="position: absolute; left: 11rem; top: -0.5rem; font-size: x-large">Trigger 4</button></p>
23
23
 
24
24
  <p>Hovering over Trigger 5 changes content.</p>
25
25
 
26
26
  <ul>
27
- <li onmouseover="document.getElementById('listDependent').setAttribute('hidden', true)">This is a list item, Trigger 5.</li>
27
+ <li onmouseover="document.getElementById('bottom').setAttribute('hidden', true)">This is a list item, Trigger 5.</li>
28
28
  <li>This is another list item, Trigger 6.</li>
29
29
  </ul>
30
30
 
31
- <p id="listDependent">This paragraph becomes invisible when you hover over Trigger 5.</p>
31
+ <div id="bottom" style="background-color: #ccc">
32
32
 
33
- <p>Triggers 1, 2, and 5 have impacts. Trigger 3 is unhoverable.</p>
34
- <p>Severity 3: impact triggers 3 (1, 2, 5), unhoverables 1 (3), total 4.</p>
35
- <p>Severity 2: removals 1, total 1.</p>
36
- <p>Severity 1: additions 3 (2), opacity changes 1 (1), total 4.</p>
37
- <p>Severity 0: opacity impact 1.</p>
33
+ <p>This division becomes invisible when you hover over Trigger 5.</p>
34
+
35
+ <p>Triggers 1, 2, and 5 have impacts. Trigger 3 is unhoverable.</p>
36
+ <p>The ordinal severity of trigger 3 is 3. The ordinal severities of triggers 1, 2, and 5 are not straightforwardly predictable.</p>
37
+
38
+ </div>
38
39
 
39
40
  </main>
40
41
  </body>
@@ -5,11 +5,12 @@
5
5
  }
6
6
  to {
7
7
  margin-right: 50%;
8
- font-size: 2rem;
8
+ font-size: 5rem;
9
9
  }
10
10
  }
11
11
  .moving {
12
- animation-duration: 4s;
13
- animation-iteration-count: 5;
12
+ animation-duration: 7s;
13
+ animation-iteration-count: 2;
14
14
  animation-name: shrink;
15
+ background-color: #ccc;
15
16
  }
@@ -1,40 +0,0 @@
1
- /*
2
- Returns the index of the newly focused member of a group of elements defined by a locator after
3
- a member of the group is focused and a key is pressed, or, if the newly focused element is not
4
- in the group, data on the newly focused element.
5
- */
6
-
7
- exports.getKeyNav = async (groupLoc, startIndex, key) => {
8
- // Click the element and press the key.
9
- const locs = await groupLoc.all();
10
- const startLoc = locs[startIndex];
11
- await startLoc.click();
12
- await startLoc.page.keyboard.press(key);
13
- // Get the newly focused element.
14
- const newFocusData = groupLoc.evaluateAll(elements => {
15
- const allEls = Array.from(document.body.querySelectorAll('*'));
16
- const groupIndexRange = [elements[0], elements.slice(-1)]
17
- .map(groupEl => allEls.findIndex(groupEl));
18
- const newFocusElement = document.activeElement;
19
- const newFocusIndex = elements.findIndex(newFocusElement);
20
- if (newFocusIndex > -1) {
21
- return newFocusIndex;
22
- }
23
- else {
24
- const index = allEls.findIndex(newFocusElement);
25
- const {tagName} = newFocusElement;
26
- const attributes = {};
27
- for (const attr of newFocusElement.attributes) {
28
- attributes[attr.name] = attr.value;
29
- }
30
- return {
31
- groupIndexRange,
32
- index,
33
- tagName,
34
- attributes
35
- };
36
- }
37
- });
38
- // Return the result.
39
- return newFocusData;
40
- };