testilo 16.1.0 → 17.0.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/README.md CHANGED
@@ -27,6 +27,18 @@ Testilo can be installed wherever Node.js (version 14 or later) is installed. Th
27
27
 
28
28
  The reason for Testilo being an independent package, rather than part of Testaro, is that Testilo can be installed on any host, while Testaro can run successfully only on a Windows or Macintosh workstation (and perhaps on some workstations with Ubuntu operating systems). Testaro runs tests similar to those that a human accessibility tester would run, using whatever browsers, input devices, system settings, simulated and attached devices, and assistive technologies tests may require. Thus, Testaro is limited to functionalities that require workstation attributes. For maximum flexibility in the management of Testaro jobs, all other functionalities are located outside of Testaro. You could have software such as Testilo running on a server, communicating with multiple workstations running Testaro. The workstations could receive job orders from the server and return job results to the server for further processing.
29
29
 
30
+ ## Configuration
31
+
32
+ Environment variables for Testilo can be specified in a `.env` file. An example:
33
+
34
+ ```bash
35
+ FUNCTIONDIR=../testdir/procs
36
+ JOBDIR=../testdir/jobs
37
+ REPORTDIR=../testdir/reports
38
+ REQUESTER=a11ymgr@a11yorg.com
39
+ SPECDIR=../testdir/specs
40
+ ```
41
+
30
42
  ## Job preparation
31
43
 
32
44
  ### Introduction
@@ -332,12 +344,11 @@ This is a valid Testaro job.
332
344
 
333
345
  If, however, you requested a merger **with** isolation, then Testilo would take cognizance of the fact that an `axe` test act is a target-modifying act. Testilo would therefore act as if another instance of the placeholder had been located in the script after the `axe` test act. So, copies of the same 6 acts that precede the `axe` test act would be inserted **after** the `axe` test act, too.
334
346
 
335
- Of the 10 tools providing tests for Testaro, 6 are target-modifying:
347
+ Of the 8 tools providing tests for Testaro, 4 are target-modifying:
336
348
  - `axe`
337
- - `continuum`
338
349
  - `htmlcs`
339
350
  - `ibm`
340
- - `wave`
351
+ - `testaro`
341
352
 
342
353
  #### Invocation
343
354
 
@@ -630,7 +641,7 @@ node call credit legislators 23pl
630
641
 
631
642
  When a user invokes `credit` in this example, the `call` module:
632
643
  - gets all the reports in the `scored` subdirectory of the `process.env.REPORTDIR` directory whose file names begin with `23pl`.
633
- - writes the credit report as JSON file named `legislators.json` to the `credit` subdirectory of the `process.env.REPORTDIR` directory.
644
+ - writes the credit report as a JSON file named `legislators.json` to the `credit` subdirectory of the `process.env.REPORTDIR` directory.
634
645
 
635
646
  The third argument to `call` (`23pl` in this example) is optional. If it is omitted, `call` will get and `credit()` will tabulate all the reports in the `scored` directory.
636
647
 
package/call.js CHANGED
@@ -66,7 +66,7 @@ const callScript = async (scriptID, classificationID = null, ... issueIDs) => {
66
66
  const scriptObj = script(scriptID, issues, ... issueIDs);
67
67
  // Save the script.
68
68
  const scriptJSON = JSON.stringify(scriptObj, null, 2);
69
- await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, scriptJSON);
69
+ await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, `${scriptJSON}\n`);
70
70
  console.log(`Script ${scriptID} created and saved in ${specDir}/scripts`);
71
71
  };
72
72
  // Fulfills a merging request.
@@ -82,7 +82,7 @@ const callMerge = async (scriptID, batchID, requester, withIsolation, todo) => {
82
82
  const destination = todo === 'true' ? 'todo' : 'pending';
83
83
  for (const job of jobs) {
84
84
  const jobJSON = JSON.stringify(job, null, 2);
85
- await fs.writeFile(`${jobDir}/${destination}/${job.id}.json`, jobJSON);
85
+ await fs.writeFile(`${jobDir}/${destination}/${job.id}.json`, `${jobJSON}\n`);
86
86
  }
87
87
  const {timeStamp} = jobs[0];
88
88
  console.log(
@@ -102,7 +102,7 @@ const callSeries = async (idStart, count, interval) => {
102
102
  const jobSeries = series(job, Number.parseInt(count), Number.parseInt(interval));
103
103
  // Save the jobs.
104
104
  for (const item of jobSeries) {
105
- await fs.writeFile(`${jobDir}/todo/${item.id}.json`, JSON.stringify(item, null, 2));
105
+ await fs.writeFile(`${jobDir}/todo/${item.id}.json`, `${JSON.stringify(item, null, 2)}\n`);
106
106
  }
107
107
  console.log(`Series of ${jobSeries.length} jobs generated and saved in ${jobDir}/todo`);
108
108
  }
@@ -141,7 +141,9 @@ const callScore = async (scorerID, selector = '') => {
141
141
  // For each scored report:
142
142
  for (const report of reports) {
143
143
  // Save it.
144
- await fs.writeFile(`${scoredReportDir}/${report.id}.json`, JSON.stringify(report, null, 2));
144
+ await fs.writeFile(
145
+ `${scoredReportDir}/${report.id}.json`, `${JSON.stringify(report, null, 2)}\n`
146
+ );
145
147
  };
146
148
  console.log(`Reports scored and saved in ${scoredReportDir}`);
147
149
  }
@@ -277,7 +279,7 @@ else if (fn === 'compare' && fnArgs.length > 1 && fnArgs.length < 4) {
277
279
  console.log('Execution completed');
278
280
  });
279
281
  }
280
- else if (fn === 'credit' && fnArgs.length === 2) {
282
+ else if (fn === 'credit' && fnArgs.length > 0 && fnArgs.length < 3) {
281
283
  callCredit(... fnArgs)
282
284
  .then(() => {
283
285
  console.log('Execution completed');
package/merge.js CHANGED
@@ -18,7 +18,6 @@ const stdRequester = process.env.REQUESTER;
18
18
  // Tools that alter the page.
19
19
  const contaminantNames = new Set([
20
20
  'axe',
21
- 'continuum',
22
21
  'htmlcs',
23
22
  'ibm'
24
23
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "16.1.0",
3
+ "version": "17.0.0",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
@@ -7283,6 +7283,11 @@ exports.issues = {
7283
7283
  quality: 1,
7284
7284
  what: 'Left angle bracket is followed by a question mark'
7285
7285
  },
7286
+ '^Bad character . after <. Probable cause: Unescaped <. Try escaping it as &lt;.*$': {
7287
+ variable: true,
7288
+ quality: 1,
7289
+ what: 'Left angle bracket is followed by an invalid character'
7290
+ },
7286
7291
  'Almost standards mode doctype. Expected <!DOCTYPE html>.': {
7287
7292
  variable: false,
7288
7293
  quality: 1,