testaro 60.12.0 → 60.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/UPGRADES.md +2 -0
- package/package.json +1 -1
- package/procs/doTestAct.js +1 -1
- package/procs/testaro.js +107 -6
- package/run.js +1 -1
- package/testaro/adbID.js +1 -3
- package/testaro/altScheme.js +1 -3
- package/testaro/captionLoc.js +1 -3
- package/testaro/datalistRef.js +1 -1
- package/testaro/embAc.js +1 -1
- package/testaro/focAndOp.js +1 -3
- package/testaro/focInd.js +1 -3
- package/testaro/focVis.js +23 -35
- package/testaro/hover-draft0.js +110 -0
- package/testaro/hover-draft1.js +185 -0
- package/testaro/hover-draft2.js +183 -0
- package/testaro/hover-draft3.js +143 -0
- package/testaro/hover-orig.js +109 -0
- package/testaro/hover.js +66 -58
- package/testaro/lineHeight.js +1 -3
- package/testaro/miniText.js +1 -1
- package/tests/testaro.js +18 -11
package/tests/testaro.js
CHANGED
|
@@ -409,7 +409,7 @@ const allRules = [
|
|
|
409
409
|
id: 'hover',
|
|
410
410
|
what: 'hover-caused content changes',
|
|
411
411
|
launchRole: 'waster',
|
|
412
|
-
timeOut:
|
|
412
|
+
timeOut: 300,
|
|
413
413
|
defaultOn: true
|
|
414
414
|
},
|
|
415
415
|
{
|
|
@@ -582,8 +582,9 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
582
582
|
ruleArgs.push(... args[ruleID]);
|
|
583
583
|
}
|
|
584
584
|
result[ruleID] ??= {};
|
|
585
|
+
const ruleResult = result[ruleID];
|
|
585
586
|
const {what} = rule;
|
|
586
|
-
|
|
587
|
+
ruleResult.what = what || '';
|
|
587
588
|
const startTime = Date.now();
|
|
588
589
|
let timeout;
|
|
589
590
|
let testRetries = 2;
|
|
@@ -600,8 +601,8 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
600
601
|
testTimes.push([rule, Math.round((endTime - startTime) / 1000)]);
|
|
601
602
|
data.rulePreventions.push(ruleID);
|
|
602
603
|
data.rulePreventionMessages[ruleID] = 'Timeout';
|
|
603
|
-
|
|
604
|
-
|
|
604
|
+
ruleResult.totals = [0, 0, 0, 0];
|
|
605
|
+
ruleResult.standardInstances = [];
|
|
605
606
|
console.log(`ERROR: Test of testaro rule ${ruleID} timed out`);
|
|
606
607
|
resolve({timedOut: true});
|
|
607
608
|
}, timeLimit);
|
|
@@ -618,26 +619,32 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
618
619
|
const endTime = Date.now();
|
|
619
620
|
testTimes.push([ruleID, Math.round((endTime - startTime) / 1000)]);
|
|
620
621
|
Object.keys(ruleOrTimeoutReport).forEach(key => {
|
|
621
|
-
|
|
622
|
+
ruleResult[key] = ruleOrTimeoutReport[key];
|
|
622
623
|
});
|
|
624
|
+
// If the test was prevented:
|
|
625
|
+
if (ruleResult.data?.prevented && ruleResult.data.error) {
|
|
626
|
+
// Add this to the result.
|
|
627
|
+
data.rulePreventions.push(ruleID);
|
|
628
|
+
data.rulePreventionMessages[ruleID] = ruleResult.data.error;
|
|
629
|
+
}
|
|
623
630
|
// If the result includes totals:
|
|
624
|
-
if (
|
|
631
|
+
if (ruleResult.totals) {
|
|
625
632
|
// Round them.
|
|
626
|
-
|
|
633
|
+
ruleResult.totals = ruleResult.totals.map(total => Math.round(total));
|
|
627
634
|
}
|
|
628
635
|
// Prevent a retry of the test.
|
|
629
636
|
testSuccess = true;
|
|
630
637
|
// If testing is to stop after a failure and the page failed the test:
|
|
631
|
-
if (
|
|
632
|
-
stopOnFail
|
|
633
|
-
&& ruleOrTimeoutReport.totals
|
|
634
|
-
&& ruleOrTimeoutReport.totals.some(total => total)) {
|
|
638
|
+
if (stopOnFail && ruleResult.totals && ruleResult.totals.some(total => total)) {
|
|
635
639
|
// Stop testing.
|
|
636
640
|
break;
|
|
637
641
|
}
|
|
638
642
|
}
|
|
639
643
|
// Otherwise, i.e. if the test timed out:
|
|
640
644
|
else {
|
|
645
|
+
// Report this.
|
|
646
|
+
data.rulePreventions.push(ruleID);
|
|
647
|
+
data.rulePreventionMessages[ruleID] = 'Timeout';
|
|
641
648
|
// Stop retrying the test.
|
|
642
649
|
break;
|
|
643
650
|
}
|