testaro 60.13.0 → 60.14.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/AGENTS.md +6 -2
- package/CONTRIBUTING.md +9 -24
- package/LICENSE +1 -1
- package/README.md +7 -24
- package/UPGRADES.md +13 -28
- package/VALIDATION_README.md +7 -24
- package/aceconfig.js +3 -18
- package/actSpecs.js +4 -19
- package/call.js +3 -18
- package/data/template.js +3 -18
- package/dirWatch.js +3 -18
- package/netWatch.js +4 -19
- package/package.json +1 -1
- package/procs/aslint.js +3 -18
- package/procs/dateOf.js +3 -18
- package/procs/doTestAct.js +4 -19
- package/procs/getLocatorData.js +3 -18
- package/procs/getSource.js +3 -18
- package/procs/identify.js +3 -18
- package/procs/isInlineLink.js +4 -19
- package/procs/job.js +3 -18
- package/procs/sample.js +3 -18
- package/procs/screenShot.js +1 -1
- package/procs/shoot.js +1 -1
- package/procs/standardize.js +4 -19
- package/procs/target.js +4 -19
- package/procs/tellServer.js +3 -18
- package/procs/testaro.js +4 -19
- package/procs/visChange.js +4 -19
- package/pw-aslint-claude.js +1 -1
- package/run.js +4 -19
- package/scripts/dumpAlts.js +4 -19
- package/testaro/adbID.js +4 -19
- package/testaro/allCaps.js +4 -19
- package/testaro/allHidden.js +4 -19
- package/testaro/allSlanted.js +4 -19
- package/testaro/altScheme.js +4 -19
- package/testaro/attVal.js +3 -18
- package/testaro/autocomplete.js +4 -19
- package/testaro/bulk.js +4 -19
- package/testaro/buttonMenu.js +4 -19
- package/testaro/captionLoc.js +4 -19
- package/testaro/datalistRef.js +4 -19
- package/testaro/distortion.js +4 -19
- package/testaro/docType.js +3 -18
- package/testaro/dupAtt.js +3 -18
- package/testaro/elements.js +3 -18
- package/testaro/embAc.js +3 -18
- package/testaro/focAll.js +4 -19
- package/testaro/focAndOp.js +4 -19
- package/testaro/focInd.js +4 -19
- package/testaro/focVis.js +4 -19
- package/testaro/headEl.js +4 -19
- package/testaro/headingAmb.js +3 -18
- package/testaro/hovInd.js +4 -19
- package/testaro/hover.js +4 -19
- package/testaro/imageLink.js +3 -18
- package/testaro/labClash.js +29 -48
- package/testaro/legendLoc.js +3 -18
- package/testaro/lineHeight.js +4 -19
- package/testaro/linkAmb.js +4 -19
- package/testaro/linkTitle.js +4 -19
- package/testaro/linkUl.js +4 -19
- package/testaro/miniText.js +4 -19
- package/testaro/motion.js +1 -1
- package/testaro/motionSolo.js +4 -19
- package/testaro/nonTable.js +4 -19
- package/testaro/optRoleSel.js +3 -18
- package/testaro/phOnly.js +3 -18
- package/testaro/pseudoP.js +3 -18
- package/testaro/radioSet.js +3 -18
- package/testaro/role.js +4 -19
- package/testaro/secHeading.js +3 -18
- package/testaro/shoot0.js +1 -1
- package/testaro/shoot1.js +1 -1
- package/testaro/styleDiff.js +3 -18
- package/testaro/tabNav.js +4 -19
- package/testaro/targetSmall.js +4 -19
- package/testaro/targetTiny.js +4 -19
- package/testaro/textNodes.js +3 -18
- package/testaro/textSem.js +3 -18
- package/testaro/title.js +3 -18
- package/testaro/zIndex.js +3 -18
- package/tests/alfa.js +4 -19
- package/tests/aslint.js +4 -19
- package/tests/axe.js +4 -19
- package/tests/ed11y.js +4 -19
- package/tests/htmlcs.js +3 -18
- package/tests/ibm.js +4 -19
- package/tests/nuVal.js +3 -18
- package/tests/qualWeb.js +3 -18
- package/tests/testaro.js +4 -19
- package/tests/wave.js +3 -18
- package/tests/wax.js +4 -19
- package/validation/done/README.md +8 -23
- package/validation/executors/dirWatch.js +4 -19
- package/validation/executors/netWatch.js +3 -18
- package/validation/executors/run.js +3 -18
- package/validation/executors/test.js +3 -18
- package/validation/executors/tests.js +3 -18
- package/validation/jobs/done/README.md +9 -0
- package/validation/jobs/todo/README.md +3 -16
- package/validation/tests/targets/adbID/index.html +3 -18
- package/validation/tests/targets/allCaps/index.html +3 -18
- package/validation/tests/targets/allHidden/ariaHiddenBody.html +3 -18
- package/validation/tests/targets/allHidden/good.html +3 -18
- package/validation/tests/targets/allHidden/hiddenMain.html +3 -18
- package/validation/tests/targets/allHidden/mixedHidden.html +3 -18
- package/validation/tests/targets/allHidden/noBody.html +4 -19
- package/validation/tests/targets/allHidden/noMain.html +4 -19
- package/validation/tests/targets/allHidden/noneDoc.html +3 -18
- package/validation/tests/targets/allHidden/visHiddenMain.html +3 -18
- package/validation/tests/targets/allSlanted/index.html +3 -18
- package/validation/tests/targets/altScheme/index.html +3 -18
- package/validation/tests/targets/attVal/bad.html +3 -18
- package/validation/tests/targets/attVal/good.html +3 -18
- package/validation/tests/targets/autocomplete/bad.html +3 -18
- package/validation/tests/targets/autocomplete/good.html +3 -18
- package/validation/tests/targets/bulk/bad.html +3 -18
- package/validation/tests/targets/bulk/good.html +3 -18
- package/validation/tests/targets/buttonMenu/bad.html +3 -18
- package/validation/tests/targets/buttonMenu/bad.js +3 -18
- package/validation/tests/targets/buttonMenu/good.html +3 -18
- package/validation/tests/targets/buttonMenu/good.js +3 -18
- package/validation/tests/targets/buttonMenu/style.css +3 -18
- package/validation/tests/targets/captionLoc/index.html +3 -18
- package/validation/tests/targets/datalistRef/index.html +3 -18
- package/validation/tests/targets/distortion/index.html +3 -18
- package/validation/tests/targets/docType/bad.html +3 -18
- package/validation/tests/targets/docType/good.html +3 -18
- package/validation/tests/targets/dupAtt/bad.html +3 -18
- package/validation/tests/targets/dupAtt/good.html +3 -18
- package/validation/tests/targets/elements/index.html +3 -18
- package/validation/tests/targets/embAc/bad.html +3 -18
- package/validation/tests/targets/embAc/good.html +3 -18
- package/validation/tests/targets/focAll/good.html +3 -18
- package/validation/tests/targets/focAll/less.html +3 -18
- package/validation/tests/targets/focAll/more.html +3 -18
- package/validation/tests/targets/focInd/bad.html +4 -19
- package/validation/tests/targets/focInd/good.html +3 -18
- package/validation/tests/targets/focOp/bad.html +3 -18
- package/validation/tests/targets/focOp/good.html +3 -18
- package/validation/tests/targets/focVis/index.html +3 -18
- package/validation/tests/targets/headEl/index.html +3 -18
- package/validation/tests/targets/headingAmb/index.html +3 -18
- package/validation/tests/targets/hovInd/index.html +4 -19
- package/validation/tests/targets/hover/bad.html +3 -18
- package/validation/tests/targets/hover/good.html +3 -18
- package/validation/tests/targets/hr/index.html +3 -18
- package/validation/tests/targets/imageLink/index.html +3 -18
- package/validation/tests/targets/labClash/bad.html +3 -18
- package/validation/tests/targets/labClash/good.html +3 -18
- package/validation/tests/targets/legendLoc/index.html +3 -18
- package/validation/tests/targets/lineHeight/index.html +3 -18
- package/validation/tests/targets/linkAmb/index.html +4 -19
- package/validation/tests/targets/linkExt/index.html +3 -18
- package/validation/tests/targets/linkOldAtt/index.html +3 -18
- package/validation/tests/targets/linkTitle/index.html +3 -18
- package/validation/tests/targets/linkTo/index.html +3 -18
- package/validation/tests/targets/linkUl/bad.html +4 -19
- package/validation/tests/targets/linkUl/good.html +4 -19
- package/validation/tests/targets/linkUl/na.html +4 -19
- package/validation/tests/targets/miniText/index.html +3 -18
- package/validation/tests/targets/motion/bad.css +3 -18
- package/validation/tests/targets/motion/bad.html +3 -18
- package/validation/tests/targets/motion/good.html +3 -18
- package/validation/tests/targets/nonTable/index.html +3 -18
- package/validation/tests/targets/opFoc/bad.html +3 -18
- package/validation/tests/targets/opFoc/good.html +3 -18
- package/validation/tests/targets/optRoleSel/index.html +3 -18
- package/validation/tests/targets/phOnly/index.html +3 -18
- package/validation/tests/targets/pseudoP/index.html +3 -18
- package/validation/tests/targets/radioSet/bad.html +3 -18
- package/validation/tests/targets/radioSet/good.html +3 -18
- package/validation/tests/targets/role/bad.html +4 -19
- package/validation/tests/targets/role/good.html +3 -18
- package/validation/tests/targets/secHeading/index.html +3 -18
- package/validation/tests/targets/styleDiff/bad.html +3 -18
- package/validation/tests/targets/styleDiff/good.html +3 -18
- package/validation/tests/targets/tabNav/bad.html +3 -18
- package/validation/tests/targets/tabNav/bad.js +3 -18
- package/validation/tests/targets/tabNav/good.html +3 -18
- package/validation/tests/targets/tabNav/good.js +3 -18
- package/validation/tests/targets/tabNav/style.css +3 -18
- package/validation/tests/targets/targetSize/index.html +4 -19
- package/validation/tests/targets/textNodes/index.html +3 -18
- package/validation/tests/targets/textSem/index.html +3 -18
- package/validation/tests/targets/title/bad.html +3 -18
- package/validation/tests/targets/title/good.html +3 -18
- package/validation/tests/targets/titledEl/index.html +3 -18
- package/validation/tests/targets/zIndex/bad.html +3 -18
- package/validation/tests/targets/zIndex/good.html +3 -18
- package/validation/validateTest.js +4 -19
- package/validation/watch/done/README.md +5 -20
- package/validation/watch/todo/README.md +5 -20
- package/testaro/hover-draft0.js +0 -110
- package/testaro/hover-draft1.js +0 -185
- package/testaro/hover-draft2.js +0 -183
- package/testaro/hover-draft3.js +0 -143
- package/testaro/hover-orig.js +0 -109
package/testaro/hover-draft3.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
© 2021–2024 CVS Health and/or one of its affiliates. All rights reserved.
|
|
3
|
-
© 2025 Jonathan Robert Pool. All rights reserved.
|
|
4
|
-
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
hover
|
|
28
|
-
This test reports unexpected impacts of hovering. The elements that are subjected to hovering
|
|
29
|
-
(called “triggers”) include all the elements that have attributes associated with control over
|
|
30
|
-
the visibility of other elements. If hovering over an element results in an increase or decrease
|
|
31
|
-
in the total count of visible elements in the tree rooted in the grandparent of the trigger,
|
|
32
|
-
the rule is considered violated.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
// ########## IMPORTS
|
|
36
|
-
|
|
37
|
-
// Module to perform common operations.
|
|
38
|
-
const {getRuleResult} = require('../procs/testaro');
|
|
39
|
-
|
|
40
|
-
// ########## FUNCTIONS
|
|
41
|
-
|
|
42
|
-
// Runs the test and returns the result.
|
|
43
|
-
exports.reporter = async (page, withItems) => {
|
|
44
|
-
// Initialize the locators and result.
|
|
45
|
-
const candidateLocs = await page.locator([
|
|
46
|
-
'[aria-controls]:visible',
|
|
47
|
-
'[aria-expanded]:visible',
|
|
48
|
-
'[aria-haspopup]:visible',
|
|
49
|
-
'[onmouseenter]:visible',
|
|
50
|
-
'[onmouseover]:visible',
|
|
51
|
-
'[onpointerenter]:visible',
|
|
52
|
-
'[onpointerover]:visible',
|
|
53
|
-
'[role="menu"]:visible',
|
|
54
|
-
'[role="menubar"]:visible',
|
|
55
|
-
'[role="menuitem"]:visible',
|
|
56
|
-
'[data-tooltip]:visible',
|
|
57
|
-
'[data-popover]:visible',
|
|
58
|
-
'[data-hover]:visible',
|
|
59
|
-
'[data-menu]:visible',
|
|
60
|
-
'[data-dropdown]:visible',
|
|
61
|
-
'[role="tab"]:visible',
|
|
62
|
-
'[role="combobox"]:visible'
|
|
63
|
-
].join(', '));
|
|
64
|
-
const allLocs = await candidateLocs.all();
|
|
65
|
-
const all = {
|
|
66
|
-
allLocs,
|
|
67
|
-
locs: [],
|
|
68
|
-
result: {
|
|
69
|
-
data: {
|
|
70
|
-
populationRatio: 1
|
|
71
|
-
},
|
|
72
|
-
totals: [0, 0, 0, 0],
|
|
73
|
-
standardInstances: []
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
// For each locator:
|
|
77
|
-
for (const loc of allLocs) {
|
|
78
|
-
// Move the mouse to the top left corner of the page.
|
|
79
|
-
await page.mouse.move(0, 0);
|
|
80
|
-
// Get the XPath of the element referenced by the locator.
|
|
81
|
-
let xPath = await loc.evaluate(element => getXPath(element));
|
|
82
|
-
// Change it to the XPath of the desired observation root.
|
|
83
|
-
const pathSegments = xPath.split('/');
|
|
84
|
-
const {length} = pathSegments;
|
|
85
|
-
pathSegments.pop();
|
|
86
|
-
if (! ['main', 'body'].includes(pathSegments[length - 2])) {
|
|
87
|
-
pathSegments.pop();
|
|
88
|
-
}
|
|
89
|
-
xPath = pathSegments.join('/');
|
|
90
|
-
const rootLoc = page.locator(`xpath=${xPath}`);
|
|
91
|
-
// Get a count of the visible elements in the observation tree.
|
|
92
|
-
const loc0 = await rootLoc.locator('*:visible');
|
|
93
|
-
const elementCount0 = await loc0.count();
|
|
94
|
-
try {
|
|
95
|
-
// Hover over the element.
|
|
96
|
-
await loc.hover({timeout: 400});
|
|
97
|
-
// Get a count of the visible elements in the observation tree.
|
|
98
|
-
const loc1 = await rootLoc.locator('*:visible');
|
|
99
|
-
const elementCount1 = await loc1.count();
|
|
100
|
-
// Stop hovering over the element.
|
|
101
|
-
await page.mouse.move(0, 0);
|
|
102
|
-
let timeoutTimer;
|
|
103
|
-
let settleInterval;
|
|
104
|
-
const timeoutPromise = new Promise(resolve => {
|
|
105
|
-
timeoutTimer = setTimeout(() => {
|
|
106
|
-
clearTimeout(settleInterval);
|
|
107
|
-
resolve();
|
|
108
|
-
});
|
|
109
|
-
}, 400);
|
|
110
|
-
settlePromise = new Promise(resolve => {
|
|
111
|
-
settleInterval = setInterval(async () => {
|
|
112
|
-
const elementCount2 = await loc1.count();
|
|
113
|
-
if (elementCount2 < elementCount1) {
|
|
114
|
-
clearTimeout(timeoutTimer);
|
|
115
|
-
clearInterval(settleInterval);
|
|
116
|
-
resolve();
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}, 75);
|
|
120
|
-
await Promise.race([timeoutPromise, settlePromise]);
|
|
121
|
-
// If the count has changed:
|
|
122
|
-
if (elementCount1 !== elementCount0) {
|
|
123
|
-
// Add the locator and a violation description to the array of violation locators.
|
|
124
|
-
const impact = elementCount1 - elementCount0;
|
|
125
|
-
all.locs.push([loc, impact]);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// If hovering times out:
|
|
129
|
-
catch(error) {
|
|
130
|
-
// Report the test prevented.
|
|
131
|
-
const {data} = all.result;
|
|
132
|
-
data.prevented = true;
|
|
133
|
-
data.error = 'ERROR hovering over an element';
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
// Populate and return the result.
|
|
138
|
-
const whats = [
|
|
139
|
-
'Hovering over the element changes the number of elements on the page by __param__',
|
|
140
|
-
'Hovering over elements changes the number of elements on the page'
|
|
141
|
-
];
|
|
142
|
-
return await getRuleResult(withItems, all, 'hover', whats, 0);
|
|
143
|
-
};
|
package/testaro/hover-orig.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
© 2021–2024 CVS Health and/or one of its affiliates. All rights reserved.
|
|
3
|
-
© 2025 Jonathan Robert Pool. All rights reserved.
|
|
4
|
-
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
hover
|
|
28
|
-
This test reports unexpected impacts of hovering. The elements that are subjected to hovering
|
|
29
|
-
(called “triggers”) include all the elements that have ARIA attributes associated with control
|
|
30
|
-
over the visibility of other elements and all the elements that have onmouseenter or
|
|
31
|
-
onmouseover attributes, as well as a sample of all visible elements in the body. If hovering over
|
|
32
|
-
an element results in an increase or decrease in the total count of visible elements in the body,
|
|
33
|
-
the rule is considered violated.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
// ########## IMPORTS
|
|
37
|
-
|
|
38
|
-
// Module to perform common operations.
|
|
39
|
-
const {init, getRuleResult} = require('../procs/testaro');
|
|
40
|
-
|
|
41
|
-
// ########## FUNCTIONS
|
|
42
|
-
|
|
43
|
-
// Runs the test and returns the result.
|
|
44
|
-
exports.reporter = async (page, withItems) => {
|
|
45
|
-
// Initialize the locators and result.
|
|
46
|
-
const allTrigger = await init(
|
|
47
|
-
20, page, '[aria-controls], [aria-expanded], [aria-haspopup], [onmouseenter], [onmouseover]'
|
|
48
|
-
);
|
|
49
|
-
const allNonTrigger = await init(
|
|
50
|
-
30 - allTrigger.result.data.sampleSize,
|
|
51
|
-
page,
|
|
52
|
-
'body *:not([aria-controls], [aria-expanded], [aria-haspopup], [onmouseenter], [onmouseover])'
|
|
53
|
-
);
|
|
54
|
-
const populationSize
|
|
55
|
-
= allTrigger.result.data.populationSize + allNonTrigger.result.data.populationSize;
|
|
56
|
-
const sampleSize = allTrigger.result.data.sampleSize + allNonTrigger.result.data.sampleSize;
|
|
57
|
-
const all = {
|
|
58
|
-
allLocs: allTrigger.allLocs.concat(allNonTrigger.allLocs),
|
|
59
|
-
locs: [],
|
|
60
|
-
result: {
|
|
61
|
-
data: {
|
|
62
|
-
populationSize,
|
|
63
|
-
sampleSize,
|
|
64
|
-
populationRatio: sampleSize ? populationSize / sampleSize : null
|
|
65
|
-
},
|
|
66
|
-
totals: [0, 0, 0, 0],
|
|
67
|
-
standardInstances: []
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
// For each locator:
|
|
71
|
-
for (const loc of all.allLocs) {
|
|
72
|
-
// Get how many elements are added or subtracted when the element is hovered over.
|
|
73
|
-
await page.mouse.move(0, 0);
|
|
74
|
-
const loc0 = page.locator('body *:visible');
|
|
75
|
-
const elementCount0 = await loc0.count();
|
|
76
|
-
// Hover over the element, whether or not covered.
|
|
77
|
-
try {
|
|
78
|
-
await loc.hover({
|
|
79
|
-
force: true,
|
|
80
|
-
timeout: 100
|
|
81
|
-
});
|
|
82
|
-
const loc1 = page.locator('body *:visible');
|
|
83
|
-
const elementCount1 = await loc1.count();
|
|
84
|
-
const additions = elementCount1 - elementCount0;
|
|
85
|
-
// If any elements are added or subtracted:
|
|
86
|
-
if (additions !== 0) {
|
|
87
|
-
// Add the locator and the change of element count to the array of violation locators.
|
|
88
|
-
const impact = additions > 0
|
|
89
|
-
? `added ${additions} elements to the page`
|
|
90
|
-
: `subtracted ${- additions} from the page`;
|
|
91
|
-
all.locs.push([loc, impact]);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// If hovering times out:
|
|
95
|
-
catch(error) {
|
|
96
|
-
// Report the test prevented.
|
|
97
|
-
const {data} = all.result;
|
|
98
|
-
data.prevented = true;
|
|
99
|
-
data.error = 'ERROR hovering over an element';
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Populate and return the result.
|
|
104
|
-
const whats = [
|
|
105
|
-
'Hovering over the element __param__',
|
|
106
|
-
'Hovering over elements adds elements to or subtracts elements from the page'
|
|
107
|
-
];
|
|
108
|
-
return await getRuleResult(withItems, all, 'hover', whats, 0);
|
|
109
|
-
};
|