testaro 4.12.2 → 4.13.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.
- package/package.json +1 -1
- package/run.js +8 -7
- package/tests/focInd.js +2 -1
- package/tests/hover.js +5 -7
package/package.json
CHANGED
package/run.js
CHANGED
|
@@ -70,16 +70,17 @@ const tenonData = {
|
|
|
70
70
|
};
|
|
71
71
|
// Keywords in log messages indicating errors.
|
|
72
72
|
const errorWords = [
|
|
73
|
-
'
|
|
73
|
+
'content security policy',
|
|
74
|
+
'deprecated',
|
|
74
75
|
'error',
|
|
75
|
-
'
|
|
76
|
+
'failed',
|
|
77
|
+
'missing',
|
|
78
|
+
'but not used',
|
|
76
79
|
'refused',
|
|
77
|
-
'content security policy',
|
|
78
|
-
'unrecognized',
|
|
79
80
|
'requires',
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
81
|
+
'suspicious',
|
|
82
|
+
'unrecognized',
|
|
83
|
+
'warning'
|
|
83
84
|
];
|
|
84
85
|
|
|
85
86
|
// ########## VARIABLES
|
package/tests/focInd.js
CHANGED
|
@@ -128,7 +128,7 @@ exports.reporter = async (page, revealAll, allowedDelay, withItems) => {
|
|
|
128
128
|
if (! hasOutline) {
|
|
129
129
|
// Returns whether a style property differs between focused and not focused.
|
|
130
130
|
const diff = prop => styleDec[prop] !== styleBlurred[prop];
|
|
131
|
-
// Determine whether the element has another
|
|
131
|
+
// Determine whether the element has another recognized focus indicator.
|
|
132
132
|
const hasDiffOutline = styleDec.outlineWidth !== '0px'
|
|
133
133
|
&& styleDec.outlineColor !== 'rgba(0, 0, 0, 0)'
|
|
134
134
|
&& (diff('outlineStyle') || diff('outlineWidth'));
|
|
@@ -138,6 +138,7 @@ exports.reporter = async (page, revealAll, allowedDelay, withItems) => {
|
|
|
138
138
|
const hasIndicator
|
|
139
139
|
= hasDiffOutline
|
|
140
140
|
|| hasDiffBorder
|
|
141
|
+
|| diff('box-shadow')
|
|
141
142
|
|| diff('fontSize')
|
|
142
143
|
|| diff('fontStyle')
|
|
143
144
|
|| diff('textDecorationLine')
|
package/tests/hover.js
CHANGED
|
@@ -28,6 +28,7 @@ const targetSelectors = ['a', 'button', 'input', '[role=menuitem]', 'span']
|
|
|
28
28
|
.join(', ');
|
|
29
29
|
// Initialize the result.
|
|
30
30
|
const data = {
|
|
31
|
+
populationSize: 0,
|
|
31
32
|
totals: {
|
|
32
33
|
triggers: 0,
|
|
33
34
|
madeVisible: 0,
|
|
@@ -83,13 +84,9 @@ const find = async (withItems, page, triggers) => {
|
|
|
83
84
|
if (['A', 'BUTTON'].includes(tagName)) {
|
|
84
85
|
const rootJSHandle = await page.evaluateHandle(
|
|
85
86
|
firstTrigger => {
|
|
86
|
-
const parent = firstTrigger.parentElement;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return firstTrigger;
|
|
92
|
-
}
|
|
87
|
+
const parent = firstTrigger.parentElement || firstTrigger;
|
|
88
|
+
const grandparent = parent.parentElement || parent;
|
|
89
|
+
return grandparent;
|
|
93
90
|
},
|
|
94
91
|
firstTrigger
|
|
95
92
|
);
|
|
@@ -226,6 +223,7 @@ exports.reporter = async (page, sampleSize = Infinity, withItems) => {
|
|
|
226
223
|
});
|
|
227
224
|
// If they number more than the sample size limit, sample them.
|
|
228
225
|
const triggerCount = triggers.length;
|
|
226
|
+
data.populationSize = triggerCount;
|
|
229
227
|
const triggerSample = triggerCount > sampleSize ? getSample(triggers, sampleSize) : triggers;
|
|
230
228
|
// Find and document the hover-triggered disclosures.
|
|
231
229
|
await find(withItems, page, triggerSample);
|