testaro 2.3.4 → 2.3.7
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/commands.js +6 -0
- package/index.js +4 -4
- package/package.json +1 -1
- package/procs/score/asp09.js +1 -1
- package/tests/aatt.js +3 -2
package/commands.js
CHANGED
|
@@ -142,6 +142,12 @@ exports.commands = {
|
|
|
142
142
|
]
|
|
143
143
|
},
|
|
144
144
|
tests: {
|
|
145
|
+
aatt: [
|
|
146
|
+
'Perform an AATT test with HTML CodeSniffer',
|
|
147
|
+
{
|
|
148
|
+
waitLong: [false, 'boolean', '', 'whether to wait 20 instead of 10 seconds for the result']
|
|
149
|
+
}
|
|
150
|
+
],
|
|
145
151
|
axe: [
|
|
146
152
|
'Perform an Axe test',
|
|
147
153
|
{
|
package/index.js
CHANGED
|
@@ -1105,16 +1105,16 @@ const doScript = async (options, report) => {
|
|
|
1105
1105
|
const scoreTable = scoreTables[0];
|
|
1106
1106
|
const {result} = scoreTable;
|
|
1107
1107
|
if (result) {
|
|
1108
|
-
const {logWeights,
|
|
1109
|
-
if (logWeights &&
|
|
1110
|
-
|
|
1108
|
+
const {logWeights, scores} = result;
|
|
1109
|
+
if (logWeights && scores) {
|
|
1110
|
+
scores.log = Math.floor(
|
|
1111
1111
|
logWeights.count * logCount
|
|
1112
1112
|
+ logWeights.size * logSize
|
|
1113
1113
|
+ logWeights.prohibited * prohibitedCount
|
|
1114
1114
|
+ logWeights.visitTimeout * visitTimeoutCount
|
|
1115
1115
|
+ logWeights.visitRejection * visitRejectionCount
|
|
1116
1116
|
);
|
|
1117
|
-
|
|
1117
|
+
scores.total += scores.log;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
package/package.json
CHANGED
package/procs/score/asp09.js
CHANGED
package/tests/aatt.js
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
const {evaluate} = require('aatt');
|
|
8
8
|
|
|
9
9
|
// FUNCTIONS
|
|
10
|
-
exports.reporter = async page => {
|
|
11
|
-
|
|
10
|
+
exports.reporter = async (page, waitLong) => {
|
|
11
|
+
// Set the limit in seconds on the wait for the result.
|
|
12
|
+
const timeLimit = waitLong ? 20 : 10;
|
|
12
13
|
// Get the HTML of the document body.
|
|
13
14
|
const source = await page.content();
|
|
14
15
|
// Return the result of a test with the HTML CodeSniffer WCAG 2.1 AA ruleset as a string.
|