testaro 4.15.0 → 5.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 +9 -7
- package/commands.js +0 -7
- package/htmlcs/HTMLCS.css +1069 -0
- package/htmlcs/HTMLCS.js +7971 -0
- package/htmlcs/Images/HTMLCS-tools.png +0 -0
- package/htmlcs/Images/bgTexture1.gif +0 -0
- package/htmlcs/Images/summaryLoader-error.gif +0 -0
- package/htmlcs/Images/summaryLoader-notice.gif +0 -0
- package/htmlcs/Images/summaryLoader-warning.gif +0 -0
- package/htmlcs/licence.txt +24 -0
- package/package.json +1 -2
- package/run.js +2 -2
- package/samples/scripts/tp11.json +164 -0
- package/tests/htmlcs.js +50 -0
- package/samples/batches/a11yorgs.json +0 -276
- package/samples/batches/doordash.json +0 -11
- package/samples/batches/greiner.json +0 -36
- package/samples/batches/siteimprove.json +0 -11
- package/samples/batches/siteimprovea11y.json +0 -11
- package/tests/aatt.js +0 -127
package/README.md
CHANGED
|
@@ -21,16 +21,16 @@ Testaro uses:
|
|
|
21
21
|
Testaro includes some of its own accessibility tests. In addition, it performs the tests in:
|
|
22
22
|
- [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) (the IBM Equal Access Accessibility Checker)
|
|
23
23
|
- [alfa](https://alfa.siteimprove.com/) (Siteimprove alfa)
|
|
24
|
-
- [
|
|
24
|
+
- [HTML CodeSniffer](https://www.npmjs.com/package/html_codesniffer) (Squiz HTML CodeSniffer)
|
|
25
25
|
- [axe-playwright](https://www.npmjs.com/package/axe-playwright) (Deque Axe-core)
|
|
26
26
|
- [Tenon](https://tenon.io/documentation/what-tenon-tests.php) (Level Access)
|
|
27
27
|
- [WAVE API](https://wave.webaim.org/api/) (WebAIM WAVE)
|
|
28
28
|
|
|
29
29
|
As of this version, the counts of tests in the packages referenced above were:
|
|
30
|
-
- AATT: 98
|
|
31
30
|
- Alfa: 103
|
|
32
31
|
- Axe-core: 138
|
|
33
32
|
- Equal Access: 163
|
|
33
|
+
- HTML CodeSniffer: 98
|
|
34
34
|
- Tenon: 180
|
|
35
35
|
- WAVE: 110
|
|
36
36
|
- subtotal: 612
|
|
@@ -81,7 +81,7 @@ To use Testaro, you must specify what it should do. You do this with a script an
|
|
|
81
81
|
|
|
82
82
|
### Introduction
|
|
83
83
|
|
|
84
|
-
To use Testaro, you provide a **script** to it. The script contains **commands**. Testaro
|
|
84
|
+
To use Testaro, you provide a **script** to it. The script contains **commands**. Testaro _runs_ the script, i.e. performs the commands in it and writes a report of the results.
|
|
85
85
|
|
|
86
86
|
A script is a JSON file with the properties:
|
|
87
87
|
|
|
@@ -280,15 +280,15 @@ Example:
|
|
|
280
280
|
}
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
The reason for this is that the Tenon API operates asynchronously. You ask it to perform a test, and it puts your request into a queue. To learn whether Tenon has completed your test, you make a status request. You can continue making status requests until Tenon replies that your test has been completed. Then you submit a request for the test result, and Tenon replies with the result. (As of May 2022, status requests were observed to misreport still-running tests as completed. The `tenon` test works around that.)
|
|
283
|
+
The reason for this is that the Tenon API operates asynchronously. You ask it to perform a test, and it puts your request into a queue. To learn whether Tenon has completed your test, you make a status request. You can continue making status requests until Tenon replies that your test has been completed. Then you submit a request for the test result, and Tenon replies with the result. (As of May 2022, status requests were observed to misreport still-running tests as completed. The `tenon` test works around that by requesting only the result and using the response to determine whether the tests have been completed.)
|
|
284
284
|
|
|
285
285
|
Tenon says that tests are typically completed in 3 to 6 seconds but that the latency can be longer, depending on demand.
|
|
286
286
|
|
|
287
|
-
Therefore, you can include a `tenonRequest` command early in your script, and a `tenon` test late in your script. Tenon will move your request through its queue while Testaro is processing your script. When Testaro reaches your `tenon` test command, Tenon will most likely have completed your test. If not, the `tenon` test will wait and then make a second request before giving up.
|
|
287
|
+
Therefore, you can include a `tenonRequest` command early in your script, and a `tenon` test command late in your script. Tenon will move your request through its queue while Testaro is processing your script. When Testaro reaches your `tenon` test command, Tenon will most likely have completed your test. If not, the `tenon` test will wait and then make a second request before giving up.
|
|
288
288
|
|
|
289
289
|
Thus, a `tenon` test actually does not perform any test; it merely collects the result. The page that was active when the `tenonRequest` command was performed is the one that Tenon tests.
|
|
290
290
|
|
|
291
|
-
In case you want to perform more than one `tenon` test, you can do so. Just give each pair of commands a distinct `id` property, so each `tenon` test command will request the correct result.
|
|
291
|
+
In case you want to perform more than one `tenon` test with the same script, you can do so. Just give each pair of commands a distinct `id` property, so each `tenon` test command will request the correct result.
|
|
292
292
|
|
|
293
293
|
Tenon recommends giving it a public URL rather than giving it the content of a page, if possible. So, it is best to give the `withNewContent` property of the `tenonRequest` command the value `true`, unless the page is not public.
|
|
294
294
|
|
|
@@ -408,9 +408,11 @@ You may wish to have Testaro perform the same sequence of tests on multiple web
|
|
|
408
408
|
|
|
409
409
|
With a batch, you can execute a single statement to run a script multiple times, one per host. On each call, Testaro takes one of the hosts in the batch and substitutes it for each host specified in a `url` command of the script. The result is a _host script_. Testaro sequentially runs all of those host scripts.
|
|
410
410
|
|
|
411
|
+
Therefore, you cannot use a batch with a script that changes URLs.
|
|
412
|
+
|
|
411
413
|
## Samples
|
|
412
414
|
|
|
413
|
-
The `samples` directory contains examples of scripts and batches. If you wish to use them in their current locations, you can give `SCRIPTDIR` the value `'samples/scripts'` and `BATCHDIR` the value `'samples/batches'`. Then execute `node
|
|
415
|
+
The `samples` directory contains examples of scripts and batches. If you wish to use them in their current locations, you can give `SCRIPTDIR` the value `'samples/scripts'` and `BATCHDIR` the value `'samples/batches'`. Then execute `node high sss` to run the `sss` script alone or `node high sss bbb` to run the `sss` script with the `bbb` batch (e.g., `node create simple weborgs`). The `high` module will create a job, run the script or host scripts, and save the report(s) in the directory that you have specified with the `REPORTDIR` environment variable.
|
|
414
416
|
|
|
415
417
|
## Execution
|
|
416
418
|
|
package/commands.js
CHANGED
|
@@ -143,13 +143,6 @@ exports.commands = {
|
|
|
143
143
|
]
|
|
144
144
|
},
|
|
145
145
|
tests: {
|
|
146
|
-
aatt: [
|
|
147
|
-
'Perform an AATT test with HTML CodeSniffer',
|
|
148
|
-
{
|
|
149
|
-
waitLong: [false, 'boolean', '', 'whether to wait 12 instead of 6 seconds for a result'],
|
|
150
|
-
tryLimit: [false, 'number', '', 'times to try the test before giving up; default 4']
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
146
|
axe: [
|
|
154
147
|
'Perform an Axe test',
|
|
155
148
|
{
|