testaro 2.3.0 → 2.3.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/aceconfig.js +0 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/tests/alfa.js +1 -1
- package/tests/ibm.js +5 -17
- package/tests/tabNav.js +1 -1
package/aceconfig.js
CHANGED
package/index.js
CHANGED
|
@@ -454,7 +454,7 @@ const goto = async (page, url, timeout, waitUntil, isStrict) => {
|
|
|
454
454
|
return 'error';
|
|
455
455
|
});
|
|
456
456
|
if (typeof response !== 'string') {
|
|
457
|
-
const httpStatus = response.
|
|
457
|
+
const httpStatus = response.statusCode;
|
|
458
458
|
if ([200, 304].includes(httpStatus) || url.startsWith('file:')) {
|
|
459
459
|
const actualURL = page.url();
|
|
460
460
|
if (isStrict && deSlash(actualURL) !== deSlash(url)) {
|
package/package.json
CHANGED
package/tests/alfa.js
CHANGED
|
@@ -24,7 +24,7 @@ exports.reporter = async page => {
|
|
|
24
24
|
return {result: {error: 'ERROR: navigation to URL timed out'}};
|
|
25
25
|
});
|
|
26
26
|
let ruleData = {};
|
|
27
|
-
if (response.
|
|
27
|
+
if (response.statusCode === 200) {
|
|
28
28
|
// Compile data on the rule IDs and summaries.
|
|
29
29
|
ruleData = await rulePage.evaluate(() => {
|
|
30
30
|
const rulePs = Array.from(document.querySelectorAll('p.h5'));
|
package/tests/ibm.js
CHANGED
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
reportLevels: [
|
|
15
15
|
'violation',
|
|
16
16
|
'recommendation'
|
|
17
|
-
]
|
|
18
|
-
outputFolder: 'temp/ibm'
|
|
17
|
+
]
|
|
19
18
|
};
|
|
20
19
|
*/
|
|
21
20
|
// Import required modules.
|
|
@@ -26,17 +25,6 @@ const run = async content => {
|
|
|
26
25
|
const nowLabel = (new Date()).toISOString().slice(0, 19);
|
|
27
26
|
// Return the result of a test.
|
|
28
27
|
const report = await getCompliance(content, nowLabel);
|
|
29
|
-
/*
|
|
30
|
-
let timeoutID;
|
|
31
|
-
const deadline = new Promise(resolve => {
|
|
32
|
-
timeoutID = setTimeout(() => {
|
|
33
|
-
resolve('');
|
|
34
|
-
}, 20000);
|
|
35
|
-
});
|
|
36
|
-
const result = Promise.race([report, deadline]);
|
|
37
|
-
clearTimeout(timeoutID);
|
|
38
|
-
return result;
|
|
39
|
-
*/
|
|
40
28
|
return report;
|
|
41
29
|
};
|
|
42
30
|
// Reports the result of an IBM test.
|
|
@@ -80,10 +68,10 @@ exports.reporter = async (page, withItems, withNewContent) => {
|
|
|
80
68
|
all.url = report(result, withItems);
|
|
81
69
|
}
|
|
82
70
|
// Delete the report files.
|
|
83
|
-
fs.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
71
|
+
const reportNames = await fs.readdir('results');
|
|
72
|
+
for (const reportName of reportNames) {
|
|
73
|
+
await fs.rm(`results/${reportName}`);
|
|
74
|
+
}
|
|
87
75
|
// Return the result.
|
|
88
76
|
return {result: all};
|
|
89
77
|
};
|
package/tests/tabNav.js
CHANGED
|
@@ -231,7 +231,7 @@ exports.reporter = async (page, withItems) => {
|
|
|
231
231
|
isCorrect = await testKey(
|
|
232
232
|
tabs, currentTab, 'End', 'end', tabCount - 1, isCorrect, itemData
|
|
233
233
|
);
|
|
234
|
-
// Update the tablist status (
|
|
234
|
+
// Update the tablist status (Node 14 does not support the ES 2021 &&= operator).
|
|
235
235
|
listIsCorrect = listIsCorrect && isCorrect;
|
|
236
236
|
// Increment the data.
|
|
237
237
|
data.totals.tabElements[isCorrect ? 'correct' : 'incorrect']++;
|