testaro 5.19.0 → 6.0.1
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/README-mixed.md +707 -0
- package/README.md +95 -115
- package/commands.js +19 -19
- package/high.js +63 -4
- package/package.json +1 -1
- package/run.js +1 -1
- package/{runHost.js → runScript.js} +9 -12
- package/samples/{scripts/simple.json → simple.json} +1 -0
- package/samples/{scripts/tp18.json → tp18.json} +3 -3
- package/tests/titledEl.js +2 -2
- package/validation/executors/debug.js +2 -2
- package/validation/executors/high.js +57 -0
- package/validation/executors/low.js +2 -2
- package/validation/executors/tenon.js +2 -2
- package/validation/executors/test.js +2 -2
- package/validation/executors/tests.js +2 -2
- package/watch.js +83 -124
- package/batchify.js +0 -25
- package/create.js +0 -172
- package/samples/batches/eurail.json +0 -11
- package/samples/batches/railpass.json +0 -11
- package/samples/batches/weborgs.json +0 -16
- package/samples/scripts/tp15.json +0 -173
- package/samples/scripts/tp16.json +0 -211
- package/validation/executors/high1.js +0 -32
- package/validation/executors/high2.js +0 -37
package/create.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
create.js
|
|
3
|
-
Creates and runs a file-based job and writes a report file.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// ########## IMPORTS
|
|
7
|
-
|
|
8
|
-
// Module to keep secrets.
|
|
9
|
-
require('dotenv').config();
|
|
10
|
-
// Module to read and write files.
|
|
11
|
-
const fs = require('fs/promises');
|
|
12
|
-
const {fork} = require('child_process');
|
|
13
|
-
const {handleRequest} = require('./run');
|
|
14
|
-
// Module to convert a script and a batch to a batch-based array of scripts.
|
|
15
|
-
const {batchify} = require('./batchify');
|
|
16
|
-
|
|
17
|
-
// ########## CONSTANTS
|
|
18
|
-
|
|
19
|
-
const scriptDir = process.env.SCRIPTDIR;
|
|
20
|
-
const batchDir = process.env.BATCHDIR;
|
|
21
|
-
const reportDir = process.env.REPORTDIR;
|
|
22
|
-
const successHosts = [];
|
|
23
|
-
const crashHosts = [];
|
|
24
|
-
const timeoutHosts = [];
|
|
25
|
-
|
|
26
|
-
// ########## VARIABLES
|
|
27
|
-
|
|
28
|
-
let healthy = true;
|
|
29
|
-
// Set 5 minutes as a default time limit per host script.
|
|
30
|
-
let timeLimit = 300;
|
|
31
|
-
let reportCount = 0;
|
|
32
|
-
let specCount = Infinity;
|
|
33
|
-
|
|
34
|
-
// ########## FUNCTIONS
|
|
35
|
-
|
|
36
|
-
// Runs one script with no batch and writes a report file.
|
|
37
|
-
const runHost = async (id, script) => {
|
|
38
|
-
const report = {
|
|
39
|
-
id,
|
|
40
|
-
host: {},
|
|
41
|
-
log: [],
|
|
42
|
-
script,
|
|
43
|
-
acts: []
|
|
44
|
-
};
|
|
45
|
-
await handleRequest(report);
|
|
46
|
-
const reportJSON = JSON.stringify(report, null, 2);
|
|
47
|
-
await fs.writeFile(`${reportDir}/${id}.json`, reportJSON);
|
|
48
|
-
};
|
|
49
|
-
// Recursively runs host scripts.
|
|
50
|
-
const runHosts = async (timeStamp, specs) => {
|
|
51
|
-
if (specs.length >= specCount) {
|
|
52
|
-
console.log(`ERROR: Tried to run again with host count ${specs.length}`);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
specCount = specs.length;
|
|
57
|
-
}
|
|
58
|
-
// If any host scripts remain to be run and the process has not been interrupted:
|
|
59
|
-
if (specs.length && healthy) {
|
|
60
|
-
// Remove the first host script from the list.
|
|
61
|
-
const spec = specs.shift();
|
|
62
|
-
const {id, host, script} = spec;
|
|
63
|
-
// Fork a child process to run that host script.
|
|
64
|
-
const subprocess = fork(
|
|
65
|
-
'runHost', [id, JSON.stringify(script), JSON.stringify(host)],
|
|
66
|
-
{
|
|
67
|
-
detached: true,
|
|
68
|
-
stdio: [0, 1, 'ignore', 'ipc']
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
let runMoreTimer = null;
|
|
72
|
-
// Let it run until it ends or, if the script or default time limit expires:
|
|
73
|
-
const timer = setTimeout(async () => {
|
|
74
|
-
clearTimeout(timer);
|
|
75
|
-
// Record the host script as timed out.
|
|
76
|
-
timeoutHosts.push(id);
|
|
77
|
-
// Kill the child process.
|
|
78
|
-
subprocess.kill('SIGKILL');
|
|
79
|
-
console.log(`Script for host ${id} took more than ${timeLimit} seconds, so was killed`);
|
|
80
|
-
// Wait 10 seconds. Then:
|
|
81
|
-
runMoreTimer = setTimeout(async () => {
|
|
82
|
-
clearTimeout(runMoreTimer);
|
|
83
|
-
// If the timeout did not coincide with the termination of the script:
|
|
84
|
-
if (! (successHosts.includes(id) || crashHosts.includes(id))) {
|
|
85
|
-
// Run the remaining host scripts.
|
|
86
|
-
console.log('Continuing with the remaining host scripts');
|
|
87
|
-
await runHosts(timeStamp, specs);
|
|
88
|
-
}
|
|
89
|
-
}, 10000);
|
|
90
|
-
}, 1000 * (script.timeLimit || timeLimit));
|
|
91
|
-
// If the child process succeeds:
|
|
92
|
-
subprocess.on('message', async message => {
|
|
93
|
-
clearTimeout(runMoreTimer);
|
|
94
|
-
clearTimeout(timer);
|
|
95
|
-
// Save its report as a file.
|
|
96
|
-
await fs.writeFile(`${reportDir}/${id}.json`, message);
|
|
97
|
-
console.log(`Report ${id}.json saved in ${reportDir}`);
|
|
98
|
-
reportCount++;
|
|
99
|
-
successHosts.push(id);
|
|
100
|
-
// Run the remaining host scripts.
|
|
101
|
-
await runHosts(timeStamp, specs);
|
|
102
|
-
});
|
|
103
|
-
// If the child process ends:
|
|
104
|
-
subprocess.on('exit', async () => {
|
|
105
|
-
// Wait 5 seconds, then:
|
|
106
|
-
const postExitTimer = setTimeout(async () => {
|
|
107
|
-
clearTimeout(postExitTimer);
|
|
108
|
-
// If its end was not due to success or a timeout:
|
|
109
|
-
if (! (successHosts.includes(id) || timeoutHosts.includes(id))) {
|
|
110
|
-
clearTimeout(runMoreTimer);
|
|
111
|
-
clearTimeout(timer);
|
|
112
|
-
// Record the host as having crashed.
|
|
113
|
-
crashHosts.push(id);
|
|
114
|
-
console.log(`Script for host ${id} crashed`);
|
|
115
|
-
// Run the remaining host scripts.
|
|
116
|
-
await runHosts(timeStamp, specs);
|
|
117
|
-
}
|
|
118
|
-
}, 5000);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
// Otherwise, i.e. if no more host scripts are to be run:
|
|
122
|
-
else {
|
|
123
|
-
// Report the metadata.
|
|
124
|
-
console.log(`Count of ${timeStamp}- reports saved in ${reportDir}: ${reportCount}`);
|
|
125
|
-
if (timeoutHosts.length) {
|
|
126
|
-
console.log(`Hosts timed out:\n${JSON.stringify(timeoutHosts, null, 2)}`);
|
|
127
|
-
}
|
|
128
|
-
if (crashHosts.length) {
|
|
129
|
-
console.log(`Hosts crashed:\n${JSON.stringify(crashHosts, null, 2)}`);
|
|
130
|
-
}
|
|
131
|
-
return '';
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
// Runs a file-based job and writes a report file for the script or each host.
|
|
135
|
-
exports.runJob = async (scriptID, batchID) => {
|
|
136
|
-
process.on('SIGINT', () => {
|
|
137
|
-
console.log('ERROR: Terminal interrupted runJob');
|
|
138
|
-
healthy = false;
|
|
139
|
-
});
|
|
140
|
-
if (scriptID) {
|
|
141
|
-
try {
|
|
142
|
-
const scriptJSON = await fs.readFile(`${scriptDir}/${scriptID}.json`, 'utf8');
|
|
143
|
-
const script = JSON.parse(scriptJSON);
|
|
144
|
-
// Get the time limit of the script or, if none, set it to 5 minutes.
|
|
145
|
-
timeLimit = script.timeLimit || timeLimit;
|
|
146
|
-
// Identify the start time and a timestamp.
|
|
147
|
-
const timeStamp = Math.floor((Date.now() - Date.UTC(2022, 1)) / 2000).toString(36);
|
|
148
|
-
// If there is a batch:
|
|
149
|
-
let batch = null;
|
|
150
|
-
if (batchID) {
|
|
151
|
-
// Convert the script to a batch-based set of host scripts.
|
|
152
|
-
const batchJSON = await fs.readFile(`${batchDir}/${batchID}.json`, 'utf8');
|
|
153
|
-
batch = JSON.parse(batchJSON);
|
|
154
|
-
const specs = batchify(script, batch, timeStamp);
|
|
155
|
-
// Recursively run each host script and save the reports.
|
|
156
|
-
await runHosts(timeStamp, specs);
|
|
157
|
-
}
|
|
158
|
-
// Otherwise, i.e. if there is no batch:
|
|
159
|
-
else {
|
|
160
|
-
// Run the script and save the result with a timestamp ID.
|
|
161
|
-
await runHost(timeStamp, script);
|
|
162
|
-
console.log(`Report ${timeStamp}.json in ${process.env.REPORTDIR}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
catch(error) {
|
|
166
|
-
console.log(`ERROR running job (${error.message})\n${error.stack}`);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
console.log('ERROR: no script specified');
|
|
171
|
-
}
|
|
172
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "tp15",
|
|
3
|
-
"what": "Alfa, Axe, Continuum, HTML CodeSniffer, IBM, Nu Html Checker, Tenon, WAVE, and 22 custom tests",
|
|
4
|
-
"strict": true,
|
|
5
|
-
"timeLimit": 500,
|
|
6
|
-
"commands": [
|
|
7
|
-
{
|
|
8
|
-
"type": "launch",
|
|
9
|
-
"which": "webkit",
|
|
10
|
-
"what": "Webkit browser"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "url",
|
|
14
|
-
"which": "https://*",
|
|
15
|
-
"what": "any page"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "tenonRequest",
|
|
19
|
-
"id": "a",
|
|
20
|
-
"withNewContent": true,
|
|
21
|
-
"what": "Tenon API version 2 test request"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "test",
|
|
25
|
-
"which": "motion",
|
|
26
|
-
"what": "spontaneous change of content; requires webkit",
|
|
27
|
-
"delay": 2500,
|
|
28
|
-
"interval": 2500,
|
|
29
|
-
"count": 5
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"type": "launch",
|
|
33
|
-
"which": "chromium",
|
|
34
|
-
"what": "Chromium browser"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "url",
|
|
38
|
-
"which": "https://*",
|
|
39
|
-
"what": "any page"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "test",
|
|
43
|
-
"which": "bulk",
|
|
44
|
-
"what": "count of visible elements"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "test",
|
|
48
|
-
"which": "embAc",
|
|
49
|
-
"withItems": true,
|
|
50
|
-
"what": "active elements incorrectly embedded in each other"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "test",
|
|
54
|
-
"which": "focAll",
|
|
55
|
-
"what": "Tab-focusability"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "test",
|
|
59
|
-
"which": "focInd",
|
|
60
|
-
"revealAll": false,
|
|
61
|
-
"allowedDelay": 250,
|
|
62
|
-
"withItems": true,
|
|
63
|
-
"what": "focus indicators"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "test",
|
|
67
|
-
"which": "focOp",
|
|
68
|
-
"withItems": true,
|
|
69
|
-
"what": "focusability and operability of elements"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"type": "test",
|
|
73
|
-
"which": "hover",
|
|
74
|
-
"headSize": 40,
|
|
75
|
-
"headSampleSize": 20,
|
|
76
|
-
"tailSampleSize": 15,
|
|
77
|
-
"withItems": true,
|
|
78
|
-
"what": "hover impacts"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "test",
|
|
82
|
-
"which": "labClash",
|
|
83
|
-
"withItems": true,
|
|
84
|
-
"what": "unlabeled and mislabeled form controls"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"type": "test",
|
|
88
|
-
"which": "linkUl",
|
|
89
|
-
"withItems": true,
|
|
90
|
-
"what": "underlining of inline links"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "test",
|
|
94
|
-
"which": "menuNav",
|
|
95
|
-
"withItems": true,
|
|
96
|
-
"what": "keyboard navigation within true-focus menus"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"type": "test",
|
|
100
|
-
"which": "radioSet",
|
|
101
|
-
"withItems": true,
|
|
102
|
-
"what": "grouping of radio buttons in fieldsets"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "test",
|
|
106
|
-
"which": "role",
|
|
107
|
-
"what": "validity and necessity of role assignments"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"type": "test",
|
|
111
|
-
"which": "styleDiff",
|
|
112
|
-
"withItems": true,
|
|
113
|
-
"what": "style consistency of headings, buttons, and links"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"type": "test",
|
|
117
|
-
"which": "tabNav",
|
|
118
|
-
"withItems": true,
|
|
119
|
-
"what": "keyboard navigation within tab lists"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"type": "test",
|
|
123
|
-
"which": "zIndex",
|
|
124
|
-
"withItems": true,
|
|
125
|
-
"what": "elements with non-auto z indexes"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"type": "test",
|
|
129
|
-
"which": "alfa",
|
|
130
|
-
"what": "Siteimprove alfa"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"type": "test",
|
|
134
|
-
"which": "axe",
|
|
135
|
-
"detailLevel": 2,
|
|
136
|
-
"rules": [],
|
|
137
|
-
"what": "Axe core, all rules"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"type": "test",
|
|
141
|
-
"which": "continuum",
|
|
142
|
-
"what": "Continuum"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"type": "test",
|
|
146
|
-
"which": "htmlcs",
|
|
147
|
-
"what": "HTML CodeSniffer"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"type": "test",
|
|
151
|
-
"which": "ibm",
|
|
152
|
-
"withItems": true,
|
|
153
|
-
"what": "IBM Accessibility Checker, with page content and again with URL"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"type": "test",
|
|
157
|
-
"which": "nuVal",
|
|
158
|
-
"what": "Nu Html Checker"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"type": "test",
|
|
162
|
-
"which": "wave",
|
|
163
|
-
"reportType": 4,
|
|
164
|
-
"what": "WAVE, report-type 4"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"type": "test",
|
|
168
|
-
"which": "tenon",
|
|
169
|
-
"id": "a",
|
|
170
|
-
"what": "Tenon API version 2 result retrieval"
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "tp16",
|
|
3
|
-
"what": "Alfa, Axe, Continuum, HTML CodeSniffer, IBM, Nu Html Checker, Tenon, WAVE, and 19 custom tests",
|
|
4
|
-
"strict": true,
|
|
5
|
-
"timeLimit": 500,
|
|
6
|
-
"commands": [
|
|
7
|
-
{
|
|
8
|
-
"type": "launch",
|
|
9
|
-
"which": "webkit",
|
|
10
|
-
"what": "Webkit browser"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "url",
|
|
14
|
-
"which": "https://*",
|
|
15
|
-
"what": "any page"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "tenonRequest",
|
|
19
|
-
"id": "a",
|
|
20
|
-
"withNewContent": true,
|
|
21
|
-
"what": "Tenon API version 2 test request"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "test",
|
|
25
|
-
"which": "motion",
|
|
26
|
-
"what": "spontaneous change of content; requires webkit",
|
|
27
|
-
"delay": 2500,
|
|
28
|
-
"interval": 2500,
|
|
29
|
-
"count": 5
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"type": "launch",
|
|
33
|
-
"which": "chromium",
|
|
34
|
-
"what": "Chromium browser"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "url",
|
|
38
|
-
"which": "https://*",
|
|
39
|
-
"what": "any page"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "test",
|
|
43
|
-
"which": "allHidden",
|
|
44
|
-
"what": "document entirely or mainly hidden"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "test",
|
|
48
|
-
"which": "bulk",
|
|
49
|
-
"what": "count of visible elements"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"type": "test",
|
|
53
|
-
"which": "docType",
|
|
54
|
-
"what": "missing or invalid doctype declaration"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "test",
|
|
58
|
-
"which": "embAc",
|
|
59
|
-
"withItems": true,
|
|
60
|
-
"what": "active elements incorrectly embedded in each other"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"type": "test",
|
|
64
|
-
"which": "focAll",
|
|
65
|
-
"what": "Tab-focusability"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"type": "test",
|
|
69
|
-
"which": "focInd",
|
|
70
|
-
"revealAll": false,
|
|
71
|
-
"allowedDelay": 250,
|
|
72
|
-
"withItems": true,
|
|
73
|
-
"what": "focus indicators"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"type": "test",
|
|
77
|
-
"which": "focOp",
|
|
78
|
-
"withItems": true,
|
|
79
|
-
"what": "focusability and operability of elements"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "test",
|
|
83
|
-
"which": "focVis",
|
|
84
|
-
"withItems": true,
|
|
85
|
-
"what": "links outside display when focused"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"type": "test",
|
|
89
|
-
"which": "hover",
|
|
90
|
-
"sampleSize": 20,
|
|
91
|
-
"withItems": true,
|
|
92
|
-
"what": "hover impacts"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"type": "test",
|
|
96
|
-
"which": "labClash",
|
|
97
|
-
"withItems": true,
|
|
98
|
-
"what": "unlabeled and mislabeled form controls"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"type": "test",
|
|
102
|
-
"which": "linkTo",
|
|
103
|
-
"withItems": true,
|
|
104
|
-
"what": "links without destinations"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"type": "test",
|
|
108
|
-
"which": "linkUl",
|
|
109
|
-
"withItems": true,
|
|
110
|
-
"what": "underlining of inline links"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"type": "test",
|
|
114
|
-
"which": "miniText",
|
|
115
|
-
"withItems": true,
|
|
116
|
-
"what": "small text"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"type": "test",
|
|
120
|
-
"which": "menuNav",
|
|
121
|
-
"withItems": true,
|
|
122
|
-
"what": "keyboard navigation within true-focus menus"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"type": "test",
|
|
126
|
-
"which": "nonTable",
|
|
127
|
-
"withItems": true,
|
|
128
|
-
"what": "tables used for layout"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"type": "test",
|
|
132
|
-
"which": "radioSet",
|
|
133
|
-
"withItems": true,
|
|
134
|
-
"what": "grouping of radio buttons in fieldsets"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"type": "test",
|
|
138
|
-
"which": "role",
|
|
139
|
-
"what": "validity and necessity of role assignments"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"type": "test",
|
|
143
|
-
"which": "styleDiff",
|
|
144
|
-
"withItems": true,
|
|
145
|
-
"what": "style consistency of headings, buttons, and links"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"type": "test",
|
|
149
|
-
"which": "tabNav",
|
|
150
|
-
"withItems": true,
|
|
151
|
-
"what": "keyboard navigation within tab lists"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"type": "test",
|
|
155
|
-
"which": "titledEl",
|
|
156
|
-
"withItems": true,
|
|
157
|
-
"what": "title attributes on inappropriate elements"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"type": "test",
|
|
161
|
-
"which": "zIndex",
|
|
162
|
-
"withItems": true,
|
|
163
|
-
"what": "elements with non-auto z indexes"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"type": "test",
|
|
167
|
-
"which": "alfa",
|
|
168
|
-
"what": "Siteimprove alfa"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"type": "test",
|
|
172
|
-
"which": "axe",
|
|
173
|
-
"detailLevel": 2,
|
|
174
|
-
"rules": [],
|
|
175
|
-
"what": "Axe core, all rules"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"type": "test",
|
|
179
|
-
"which": "continuum",
|
|
180
|
-
"what": "Continuum"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"type": "test",
|
|
184
|
-
"which": "htmlcs",
|
|
185
|
-
"what": "HTML CodeSniffer"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"type": "test",
|
|
189
|
-
"which": "ibm",
|
|
190
|
-
"withItems": true,
|
|
191
|
-
"what": "IBM Accessibility Checker, with page content and again with URL"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"type": "test",
|
|
195
|
-
"which": "nuVal",
|
|
196
|
-
"what": "Nu Html Checker"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"type": "test",
|
|
200
|
-
"which": "wave",
|
|
201
|
-
"reportType": 4,
|
|
202
|
-
"what": "WAVE, report-type 4"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"type": "test",
|
|
206
|
-
"which": "tenon",
|
|
207
|
-
"id": "a",
|
|
208
|
-
"what": "Tenon API version 2 result retrieval"
|
|
209
|
-
}
|
|
210
|
-
]
|
|
211
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// high1.js
|
|
2
|
-
// Validator for high-level invocation of Testaro without a batch.
|
|
3
|
-
|
|
4
|
-
const fs = require('fs/promises');
|
|
5
|
-
process.env.SCRIPTDIR = 'samples/scripts';
|
|
6
|
-
process.env.REPORTDIR = 'temp';
|
|
7
|
-
const {runJob} = require('../../create');
|
|
8
|
-
const validate = async (scriptID) => {
|
|
9
|
-
const timeStamp = await runJob(scriptID);
|
|
10
|
-
try {
|
|
11
|
-
const reportJSON = await fs.readFile(`${__dirname}/../../temp/${timeStamp}.json`);
|
|
12
|
-
const report = JSON.parse(reportJSON);
|
|
13
|
-
const {log, acts} = report;
|
|
14
|
-
if (log.length !== 2) {
|
|
15
|
-
console.log(
|
|
16
|
-
`Failure: log length is ${log.length} instead of 2 (see temp/${timeStamp}.json})`
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
else if (acts.length !== 3) {
|
|
20
|
-
console.log(
|
|
21
|
-
`Failure: acts length is ${acts.length} instead of 3 (see temp/${timeStamp}.json})`
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
console.log(`Success (report is in temp/${timeStamp}.json)`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
catch(error) {
|
|
29
|
-
console.log(`ERROR: ${error.message}`);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
validate('simple');
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// high2.js
|
|
2
|
-
// Validator for high-level invocation of Testaro with a batch.
|
|
3
|
-
|
|
4
|
-
const fs = require('fs/promises');
|
|
5
|
-
process.env.SCRIPTDIR = 'samples/scripts';
|
|
6
|
-
process.env.BATCHDIR = 'samples/batches';
|
|
7
|
-
process.env.REPORTDIR = 'temp';
|
|
8
|
-
const {runJob} = require('../../create');
|
|
9
|
-
const validate = async (scriptID, batchID) => {
|
|
10
|
-
const timeStamp = await runJob(scriptID, batchID);
|
|
11
|
-
try {
|
|
12
|
-
const tempFileNames = await fs.readdir(`${__dirname}/../../temp`);
|
|
13
|
-
const reportFileNames = tempFileNames.filter(fileName => fileName.startsWith(timeStamp));
|
|
14
|
-
for (const fileName of reportFileNames) {
|
|
15
|
-
const reportJSON = await fs.readFile(`${__dirname}/../../temp/${fileName}`);
|
|
16
|
-
const report = JSON.parse(reportJSON);
|
|
17
|
-
const {log, acts} = report;
|
|
18
|
-
if (log.length !== 2) {
|
|
19
|
-
console.log(
|
|
20
|
-
`Failure: log length is ${log.length} instead of 2 (see temp/${fileName})`
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
else if (acts.length !== 3) {
|
|
24
|
-
console.log(
|
|
25
|
-
`Failure: acts length is ${acts.length} instead of 3 (see temp/${fileName})`
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
console.log(`Success (report is in temp/${fileName})`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch(error) {
|
|
34
|
-
console.log(`ERROR: ${error.message}`);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
validate('simple', 'weborgs');
|