testaro 2.1.2 → 2.2.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.
Files changed (67) hide show
  1. package/README.md +14 -9
  2. package/package.json +1 -1
  3. package/scoring/correlation.js +3 -3
  4. package/scoring/dupCounts.js +2 -2
  5. package/scoring/packageData.js +2 -2
  6. package/tests/radioSet.js +1 -1
  7. package/validation/executors/appBatch.js +87 -0
  8. package/validation/executors/appNoBatch.js +67 -0
  9. package/validation/executors/tests.js +53 -0
  10. package/validation/{scripts/test → tests/scripts}/bulk.json +2 -2
  11. package/validation/{scripts/test → tests/scripts}/embAc.json +2 -2
  12. package/validation/{scripts/test → tests/scripts}/focAll.json +3 -3
  13. package/validation/{scripts/test → tests/scripts}/focInd.json +2 -2
  14. package/validation/{scripts/test → tests/scripts}/focOp.json +2 -2
  15. package/validation/{scripts/test → tests/scripts}/hover.json +2 -2
  16. package/validation/{scripts/test → tests/scripts}/labClash.json +2 -2
  17. package/validation/{scripts/test → tests/scripts}/linkUl.json +3 -3
  18. package/validation/{scripts/test → tests/scripts}/menuNav.json +2 -2
  19. package/validation/{scripts/test → tests/scripts}/motion.json +2 -2
  20. package/validation/{scripts/test → tests/scripts}/radioSet.json +2 -2
  21. package/validation/{scripts/test → tests/scripts}/role.json +2 -2
  22. package/validation/{scripts/test → tests/scripts}/styleDiff.json +2 -2
  23. package/validation/{scripts/test → tests/scripts}/tabNav.json +2 -2
  24. package/validation/{scripts/test → tests/scripts}/zIndex.json +2 -2
  25. package/validation/{targets → tests/targets}/bulk/bad.html +0 -0
  26. package/validation/{targets → tests/targets}/bulk/good.html +0 -0
  27. package/validation/{targets → tests/targets}/embAc/bad.html +0 -0
  28. package/validation/{targets → tests/targets}/embAc/good.html +0 -0
  29. package/validation/{targets → tests/targets}/focAll/good.html +0 -0
  30. package/validation/{targets → tests/targets}/focAll/less.html +0 -0
  31. package/validation/{targets → tests/targets}/focAll/more.html +0 -0
  32. package/validation/{targets → tests/targets}/focInd/bad.html +0 -0
  33. package/validation/{targets → tests/targets}/focInd/good.html +0 -0
  34. package/validation/{targets → tests/targets}/focOp/bad.html +0 -0
  35. package/validation/{targets → tests/targets}/focOp/good.html +0 -0
  36. package/validation/{targets → tests/targets}/hover/bad.html +0 -0
  37. package/validation/{targets → tests/targets}/hover/good.html +0 -0
  38. package/validation/{targets → tests/targets}/labClash/bad.html +0 -0
  39. package/validation/{targets → tests/targets}/labClash/good.html +0 -0
  40. package/validation/{targets → tests/targets}/linkUl/bad.html +0 -0
  41. package/validation/{targets → tests/targets}/linkUl/good.html +0 -0
  42. package/validation/{targets → tests/targets}/linkUl/na.html +0 -0
  43. package/validation/{targets → tests/targets}/menuNav/bad.html +0 -0
  44. package/validation/{targets → tests/targets}/menuNav/bad.js +0 -0
  45. package/validation/{targets → tests/targets}/menuNav/good.html +0 -0
  46. package/validation/{targets → tests/targets}/menuNav/good.js +0 -0
  47. package/validation/{targets → tests/targets}/menuNav/style.css +0 -0
  48. package/validation/{targets → tests/targets}/motion/bad.css +0 -0
  49. package/validation/{targets → tests/targets}/motion/bad.html +0 -0
  50. package/validation/{targets → tests/targets}/motion/good.html +0 -0
  51. package/validation/{targets → tests/targets}/radioSet/bad.html +0 -0
  52. package/validation/{targets → tests/targets}/radioSet/good.html +0 -0
  53. package/validation/{targets → tests/targets}/role/bad.html +0 -0
  54. package/validation/{targets → tests/targets}/role/good.html +0 -0
  55. package/validation/{targets → tests/targets}/styleDiff/bad.html +0 -0
  56. package/validation/{targets → tests/targets}/styleDiff/good.html +0 -0
  57. package/validation/{targets → tests/targets}/tabNav/bad.html +0 -0
  58. package/validation/{targets → tests/targets}/tabNav/bad.js +0 -0
  59. package/validation/{targets → tests/targets}/tabNav/good.html +0 -0
  60. package/validation/{targets → tests/targets}/tabNav/good.js +0 -0
  61. package/validation/{targets → tests/targets}/tabNav/goodMoz.js +0 -0
  62. package/validation/{targets → tests/targets}/tabNav/style.css +0 -0
  63. package/validation/{targets → tests/targets}/zIndex/bad.html +0 -0
  64. package/validation/{targets → tests/targets}/zIndex/good.html +0 -0
  65. package/validation/batches/sample.json +0 -13
  66. package/validation/executors/sample.js +0 -11
  67. package/validation/scripts/app/sample.json +0 -21
package/README.md CHANGED
@@ -8,9 +8,9 @@ Testaro is a collection of web accessibility tests.
8
8
 
9
9
  The purpose of Testaro is to provide programmatic access to over 600 accessibility tests defined in several test packages and in Testaro itself.
10
10
 
11
- Calling Testaro requires telling it which operations (including tests) to perform, which URLs to perform them on, and where to write its reports.
11
+ Running Testaro requires telling it which operations (including tests) to perform and which URLs to perform them on, and giving Testaro an object to put its output into.
12
12
 
13
- Testaro outputs progress messages and a list of reports to the standard output. It writes the reports in JSON format.
13
+ Testaro outputs progress messages to the standard output. It populates the object with log information and test reports.
14
14
 
15
15
  ## System requirements
16
16
 
@@ -47,7 +47,7 @@ The main directories containing code files are:
47
47
  - package root: main code files
48
48
  - `tests`: files containing the code defining particular tests
49
49
  - `procs`: shared procedures
50
- - `validation`: code and artifacts for the validation of tests
50
+ - `validation`: code and artifacts for the validation of Testaro
51
51
 
52
52
  ## Installation
53
53
 
@@ -256,12 +256,6 @@ An example of a **Testaro-defined** test is:
256
256
 
257
257
  In this case, Testaro runs the `motion` test with the specified parameters.
258
258
 
259
- ###### Validation
260
-
261
- For each of the non-package tests defined in Testaro, a validating script and some files tested by it are also provided. They are in the `validation` directory. A module that you can use to execute those scripts is also there, named `validator.js`.
262
-
263
- For example, to execute the `focOp.json` validation script, you can enter `node validation/validator focOp`. The `validator.js` module outputs the report to the console.
264
-
265
259
  ##### Scoring
266
260
 
267
261
  An example of a **scoring** command is:
@@ -442,6 +436,17 @@ If a `wave` test is included in the script, an environment variable named `TESTA
442
436
 
443
437
  Before executing a Testaro script, you can optionally also set the environment variables `TESTARO_DEBUG` (to `'true'` or anything else) and/or `TESTARO_WAITS` (to a non-negative integer). The effects of these variables are described in the `index.js` file.
444
438
 
439
+ ## Validation
440
+
441
+ Three _executors_ for Testaro validation are located in the `validation` directory. An executor is a commonJS JavaScript module that runs Testaro and reports whether the results are correct.
442
+
443
+ The executors are:
444
+ - `appNoBatch.js`: Reports whether Testaro runs correctly with a no-batch script.
445
+ - `appBatch.js`: Reports whether Testaro runs correctly with a script and a batch.
446
+ - `tests.js`: Runs Testaro with each custom test and reports whether the results are correct.
447
+
448
+ To execute any executor `xyz.js`, call it with the statement `node validation/executors/xyz`. The results will appear in the standard output.
449
+
445
450
  ## Contribution
446
451
 
447
452
  You can define additional Testaro commands and functionality. Contributions are welcome.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,9 +5,9 @@
5
5
  */
6
6
  const fs = require('fs');
7
7
  const compile = () => {
8
- const issuesJSON = fs.readFileSync(`${__dirname}/scoring/package/issues.json`, 'utf8');
8
+ const issuesJSON = fs.readFileSync(`${__dirname}/package/issues.json`, 'utf8');
9
9
  const issues = JSON.parse(issuesJSON);
10
- const dataJSON = fs.readFileSync(`${__dirname}/scoring/package/data.json`, 'utf8');
10
+ const dataJSON = fs.readFileSync(`${__dirname}/package/data.json`, 'utf8');
11
11
  const reportData = JSON.parse(dataJSON);
12
12
  const reports = Object.values(reportData);
13
13
  // Initialize the list.
@@ -72,5 +72,5 @@ const compile = () => {
72
72
  return data;
73
73
  };
74
74
  fs.writeFileSync(
75
- `${__dirname}/scoring/package/correlations.json`, JSON.stringify(compile(), null, 2)
75
+ `${__dirname}/package/correlations.json`, JSON.stringify(compile(), null, 2)
76
76
  );
@@ -7,7 +7,7 @@
7
7
  */
8
8
  const fs = require('fs');
9
9
  const compile = () => {
10
- const dupsJSON = fs.readFileSync(`${__dirname}/scoring/package/duplications.json`, 'utf8');
10
+ const dupsJSON = fs.readFileSync(`${__dirname}/package/duplications.json`, 'utf8');
11
11
  const dups = JSON.parse(dupsJSON);
12
12
  // Initialize the object.
13
13
  const data = {
@@ -36,4 +36,4 @@ const compile = () => {
36
36
  });
37
37
  return data;
38
38
  };
39
- fs.writeFileSync(`${__dirname}/scoring/package/dupCounts.json`, JSON.stringify(compile(), null, 2));
39
+ fs.writeFileSync(`${__dirname}/package/dupCounts.json`, JSON.stringify(compile(), null, 2));
@@ -120,7 +120,7 @@ const compilers = {
120
120
  };
121
121
  const repo = process.argv[2];
122
122
  const compile = repo => {
123
- const dirPath = `${__dirname}/../${repo}/reports/script`;
123
+ const dirPath = `${__dirname}/../../${repo}/reports/script`;
124
124
  const batchDirNames = fs
125
125
  .readdirSync(dirPath, {withFileTypes: true})
126
126
  .filter(dirEnt => dirEnt.isDirectory())
@@ -168,4 +168,4 @@ const compile = repo => {
168
168
  });
169
169
  return data;
170
170
  };
171
- fs.writeFileSync(`${__dirname}/scoring/package/data.json`, JSON.stringify(compile(repo), null, 2));
171
+ fs.writeFileSync(`${__dirname}/package/data.json`, JSON.stringify(compile(repo), null, 2));
package/tests/radioSet.js CHANGED
@@ -12,7 +12,7 @@ exports.reporter = async (page, withItems) => {
12
12
  // If itemization is required:
13
13
  if (withItems) {
14
14
  // Add the body of the textOf function as a string to the array.
15
- const textOfBody = await fs.readFile(`${__dirname}/procs/test/textOf.txt`, 'utf8');
15
+ const textOfBody = await fs.readFile(`${__dirname}/../procs/test/textOf.txt`, 'utf8');
16
16
  args.push(textOfBody);
17
17
  }
18
18
  // Get the result data.
@@ -0,0 +1,87 @@
1
+ // app.js
2
+ // Validator for Testaro application with a script and a batch.
3
+
4
+ const options = {
5
+ script: {
6
+ what: 'Sample Testaro executor with 1 test',
7
+ strict: true,
8
+ commands: [
9
+ {
10
+ type: 'launch',
11
+ which: 'chromium',
12
+ what: 'Chromium browser'
13
+ },
14
+ {
15
+ type: 'url',
16
+ which: 'https://*',
17
+ what: 'URL to be replaced with URLs in the batch'
18
+ },
19
+ {
20
+ type: 'test',
21
+ which: 'bulk',
22
+ what: 'bulk'
23
+ },
24
+ {
25
+ type: 'test',
26
+ which: 'noSuchTest',
27
+ what: 'test that does not exist'
28
+ }
29
+ ]
30
+ },
31
+ batch: {
32
+ what: 'Two websites',
33
+ hosts: [
34
+ {
35
+ which: 'https://www.w3.org/',
36
+ what: 'W3C'
37
+ },
38
+ {
39
+ which: 'https://www.wikimedia.org/',
40
+ what: 'Wikimedia'
41
+ }
42
+ ]
43
+ },
44
+ log: [],
45
+ reports: []
46
+ };
47
+ const {handleRequest} = require(`${__dirname}/../../index`);
48
+ const isValidReport = (reports, index) => {
49
+ const isValid = reports[index].acts
50
+ && reports[index].acts.length === 4
51
+ && reports[index].acts[2].result
52
+ && reports[index].acts[2].result.visibleElements
53
+ && typeof reports[index].acts[2].result.visibleElements === 'number'
54
+ && reports[index].acts[3].result
55
+ && typeof reports[index].acts[3].result === 'string'
56
+ && reports[index].acts[3].result.startsWith('ERROR');
57
+ return isValid;
58
+ };
59
+ handleRequest(options)
60
+ .then(
61
+ () => {
62
+ const {log, reports} = options;
63
+ if (
64
+ log.length === 4
65
+ && log[1].event === 'timeStamp'
66
+ && /^[a-z0-9]+$/.test(log[1].value)
67
+ && log[2].event === 'batchSize'
68
+ && log[2].value === 2
69
+ ) {
70
+ console.log('Success: Log has been correctly populated');
71
+ }
72
+ else {
73
+ console.log('Failure: Log empty or invalid');
74
+ console.log(JSON.stringify(log, null, 2));
75
+ }
76
+ if (reports.length === 2 && isValidReport(reports, 0) && isValidReport(reports, 1)) {
77
+ console.log('Success: Reports have been correctly populated');
78
+ }
79
+ else {
80
+ console.log('Failure: Reports empty or invalid');
81
+ console.log(JSON.stringify(reports, null, 2));
82
+ }
83
+ },
84
+ rejection => {
85
+ console.log(`Failure: ${rejection}`);
86
+ }
87
+ );
@@ -0,0 +1,67 @@
1
+ // app.js
2
+ // Validator for Testaro application with a no-batch script.
3
+
4
+ const options = {
5
+ script: {
6
+ what: 'Sample Testaro executor with 1 test',
7
+ strict: true,
8
+ commands: [
9
+ {
10
+ type: 'launch',
11
+ which: 'chromium',
12
+ what: 'Chromium browser'
13
+ },
14
+ {
15
+ type: 'url',
16
+ which: 'https://example.com/',
17
+ what: 'simple page, replaced if there is a batch'
18
+ },
19
+ {
20
+ type: 'test',
21
+ which: 'bulk',
22
+ what: 'bulk'
23
+ },
24
+ {
25
+ type: 'test',
26
+ which: 'noSuchTest',
27
+ what: 'test that does not exist'
28
+ }
29
+ ]
30
+ },
31
+ log: [],
32
+ reports: []
33
+ };
34
+ const {handleRequest} = require(`${__dirname}/../../index`);
35
+ handleRequest(options)
36
+ .then(
37
+ () => {
38
+ const {log, reports} = options;
39
+ if (log.length === 3 && log[1].event === 'timeStamp' && /^[a-z0-9]+$/.test(log[1].value)) {
40
+ console.log('Success: Log has been correctly populated');
41
+ }
42
+ else {
43
+ console.log('Failure: Log empty or invalid');
44
+ console.log(JSON.stringify(log, null, 2));
45
+ }
46
+ if (
47
+ reports.length === 1
48
+ && reports[0].acts
49
+ && reports[0].acts.length === 4
50
+ && reports[0].acts[2].result
51
+ && reports[0].acts[2].result.visibleElements
52
+ && typeof reports[0].acts[2].result.visibleElements === 'number'
53
+ && reports[0].acts[3].result
54
+ && typeof reports[0].acts[3].result === 'string'
55
+ && reports[0].acts[3].result.startsWith('ERROR')
56
+ ) {
57
+ console.log('Success: Reports have been correctly populated');
58
+ }
59
+ else {
60
+ console.log('Failure: Reports empty or invalid');
61
+ console.log(JSON.stringify(reports, null, 2));
62
+ }
63
+ },
64
+ rejection => {
65
+ console.log(`Failure: ${rejection}`);
66
+ }
67
+ );
@@ -0,0 +1,53 @@
1
+ // app.js
2
+ // Validator for Testaro tests.
3
+
4
+ const fs = require('fs').promises;
5
+ const {handleRequest} = require(`${__dirname}/../../index`);
6
+ const validateTests = async () => {
7
+ const scriptFileNames = await fs.readdir(`${__dirname}/../tests/scripts`);
8
+ for (const scriptFileName of scriptFileNames) {
9
+ const rawScriptJSON = await fs
10
+ .readFile(`${__dirname}/../tests/scripts/${scriptFileName}`, 'utf8');
11
+ const scriptJSON = rawScriptJSON
12
+ .replace(/__targets__/g, `file://${__dirname}/../tests/targets`);
13
+ const script = JSON.parse(scriptJSON);
14
+ const options = {script};
15
+ options.log = [];
16
+ options.reports = [];
17
+ await handleRequest(options);
18
+ const {log, reports} = options;
19
+ if (log.length === 3 && log[1].event === 'timeStamp' && /^[a-z0-9]+$/.test(log[1].value)) {
20
+ console.log('Success: Log has been correctly populated');
21
+ }
22
+ else {
23
+ console.log('Failure: Log empty or invalid');
24
+ console.log(JSON.stringify(log, null, 2));
25
+ }
26
+ if (
27
+ reports.length === 1
28
+ && reports[0].acts
29
+ && reports[0].acts.length === script.commands.length
30
+ && reports[0].acts.every(
31
+ act => act.type && act.type === 'test'
32
+ ? act.result && act.result.failureCount !== undefined
33
+ : true
34
+ )
35
+ ) {
36
+ console.log('Success: Reports have been correctly populated');
37
+ if (reports[0].acts.every(
38
+ act => act.type === 'test' ? act.result.failureCount === 0 : true
39
+ )) {
40
+ console.log('Success: No failures');
41
+ }
42
+ else {
43
+ console.log('Failure: At least one test has at least one failure');
44
+ console.log(JSON.stringify(reports, null, 2));
45
+ }
46
+ }
47
+ else {
48
+ console.log('Failure: Reports empty or invalid');
49
+ console.log(JSON.stringify(reports, null, 2));
50
+ }
51
+ }
52
+ };
53
+ validateTests();
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/bulk/good.html",
12
+ "which": "__targets__/bulk/good.html",
13
13
  "what": "small page"
14
14
  },
15
15
  {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  {
25
25
  "type": "url",
26
- "which": "file://__dirname/validation/targets/bulk/bad.html",
26
+ "which": "__targets__/bulk/bad.html",
27
27
  "what": "large page"
28
28
  },
29
29
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/embAc/good.html",
12
+ "which": "__targets__/embAc/good.html",
13
13
  "what": "page without embedding in links or buttons"
14
14
  },
15
15
  {
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  "type": "url",
29
- "which": "file://__dirname/validation/targets/embAc/bad.html",
29
+ "which": "__targets__/embAc/bad.html",
30
30
  "what": "page with embeddings in links and buttons"
31
31
  },
32
32
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/focAll/good.html",
12
+ "which": "__targets__/focAll/good.html",
13
13
  "what": "fully Tab-focusable page"
14
14
  },
15
15
  {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  {
27
27
  "type": "url",
28
- "which": "file://__dirname/validation/targets/focAll/less.html",
28
+ "which": "__targets__/focAll/less.html",
29
29
  "what": "partly Tab-focusable page"
30
30
  },
31
31
  {
@@ -41,7 +41,7 @@
41
41
  },
42
42
  {
43
43
  "type": "url",
44
- "which": "file://__dirname/validation/targets/focAll/more.html",
44
+ "which": "__targets__/focAll/more.html",
45
45
  "what": "page with added Tab-focusability"
46
46
  },
47
47
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/focInd/good.html",
12
+ "which": "__targets__/focInd/good.html",
13
13
  "what": "page with outline focus indication"
14
14
  },
15
15
  {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "type": "url",
33
- "which": "file://__dirname/validation/targets/focInd/bad.html",
33
+ "which": "__targets__/focInd/bad.html",
34
34
  "what": "page with mixed focus indication"
35
35
  },
36
36
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/focOp/good.html",
12
+ "which": "__targets__/focOp/good.html",
13
13
  "what": "page with standard focusability and operability"
14
14
  },
15
15
  {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  {
31
31
  "type": "url",
32
- "which": "file://__dirname/validation/targets/focOp/bad.html",
32
+ "which": "__targets__/focOp/bad.html",
33
33
  "what": "page with deviant focusability and operability"
34
34
  },
35
35
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/hover/good.html",
12
+ "which": "__targets__/hover/good.html",
13
13
  "what": "page with standard hover behavior"
14
14
  },
15
15
  {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "type": "url",
30
- "which": "file://__dirname/validation/targets/hover/bad.html",
30
+ "which": "__targets__/hover/bad.html",
31
31
  "what": "page with deviant hover behavior"
32
32
  },
33
33
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/labClash/good.html",
12
+ "which": "__targets__/labClash/good.html",
13
13
  "what": "page with standard labeling"
14
14
  },
15
15
  {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  {
27
27
  "type": "url",
28
- "which": "file://__dirname/validation/targets/labClash/bad.html",
28
+ "which": "__targets__/labClash/bad.html",
29
29
  "what": "page with deviant labeling"
30
30
  },
31
31
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/linkUl/good.html",
12
+ "which": "__targets__/linkUl/good.html",
13
13
  "what": "page with underlined inline links"
14
14
  },
15
15
  {
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  "type": "url",
29
- "which": "file://__dirname/validation/targets/linkUl/bad.html",
29
+ "which": "__targets__/linkUl/bad.html",
30
30
  "what": "page without underlined inline links"
31
31
  },
32
32
  {
@@ -43,7 +43,7 @@
43
43
  },
44
44
  {
45
45
  "type": "url",
46
- "which": "file://__dirname/validation/targets/linkUl/na.html",
46
+ "which": "__targets__/linkUl/na.html",
47
47
  "what": "page without inline links"
48
48
  },
49
49
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/menuNav/good.html",
12
+ "which": "__targets__/menuNav/good.html",
13
13
  "what": "page with standard menu navigation"
14
14
  },
15
15
  {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "type": "url",
55
- "which": "file://__dirname/validation/targets/menuNav/bad.html",
55
+ "which": "__targets__/menuNav/bad.html",
56
56
  "what": "page with deviant menu navigation"
57
57
  },
58
58
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/motion/good.html",
12
+ "which": "__targets__/motion/good.html",
13
13
  "what": "page without motion"
14
14
  },
15
15
  {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "type": "url",
33
- "which": "file://__dirname/validation/targets/motion/bad.html",
33
+ "which": "__targets__/motion/bad.html",
34
34
  "what": "page with motion"
35
35
  },
36
36
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/radioSet/good.html",
12
+ "which": "__targets__/radioSet/good.html",
13
13
  "what": "page with standard radio-button grouping"
14
14
  },
15
15
  {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  {
27
27
  "type": "url",
28
- "which": "file://__dirname/validation/targets/radioSet/bad.html",
28
+ "which": "__targets__/radioSet/bad.html",
29
29
  "what": "page with deviant radio-button grouping"
30
30
  },
31
31
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/role/good.html",
12
+ "which": "__targets__/role/good.html",
13
13
  "what": "page with standard roles"
14
14
  },
15
15
  {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  {
25
25
  "type": "url",
26
- "which": "file://__dirname/validation/targets/role/bad.html",
26
+ "which": "__targets__/role/bad.html",
27
27
  "what": "page with deviant roles"
28
28
  },
29
29
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/styleDiff/good.html",
12
+ "which": "__targets__/styleDiff/good.html",
13
13
  "what": "page with consistent styles"
14
14
  },
15
15
  {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  {
34
34
  "type": "url",
35
- "which": "file://__dirname/validation/targets/styleDiff/bad.html",
35
+ "which": "__targets__/styleDiff/bad.html",
36
36
  "what": "page with consistent styles"
37
37
  },
38
38
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/tabNav/good.html",
12
+ "which": "__targets__/tabNav/good.html",
13
13
  "what": "page with standard menu navigation"
14
14
  },
15
15
  {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "type": "url",
55
- "which": "file://__dirname/validation/targets/tabNav/bad.html",
55
+ "which": "__targets__/tabNav/bad.html",
56
56
  "what": "page with deviant menu navigation"
57
57
  },
58
58
  {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "type": "url",
12
- "which": "file://__dirname/validation/targets/zIndex/good.html",
12
+ "which": "__targets__/zIndex/good.html",
13
13
  "what": "page with no explicit z-index attributes"
14
14
  },
15
15
  {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  {
25
25
  "type": "url",
26
- "which": "file://__dirname/validation/targets/zIndex/bad.html",
26
+ "which": "__targets__/zIndex/bad.html",
27
27
  "what": "page with explicit z-index attributes roles"
28
28
  },
29
29
  {
@@ -1,13 +0,0 @@
1
- {
2
- "what": "Sample batch",
3
- "hosts": [
4
- {
5
- "which": "https://www.w3.org/",
6
- "what": "W3C"
7
- },
8
- {
9
- "which": "https://www.wikimedia.org/",
10
- "what": "Wikimedia"
11
- }
12
- ]
13
- }
@@ -1,11 +0,0 @@
1
- // sample.js
2
- // Sample executor for Testaro.
3
-
4
- const options = {
5
- reports: `${__dirname}/../reports`,
6
- // To use the sample batch, uncomment the following line.
7
- batches: `${__dirname}/../batches/sample.json`,
8
- script: `${__dirname}/../scripts/app/sample.json`
9
- };
10
- const {handleRequest} = require('../../index');
11
- handleRequest(options);
@@ -1,21 +0,0 @@
1
- {
2
- "what": "Sample Testaro executor with 1 test",
3
- "strict": true,
4
- "commands": [
5
- {
6
- "type": "launch",
7
- "which": "chromium",
8
- "what": "Chromium browser"
9
- },
10
- {
11
- "type": "url",
12
- "which": "https://example.com/",
13
- "what": "simple page, replaced if there is a batch"
14
- },
15
- {
16
- "type": "test",
17
- "which": "bulk",
18
- "what": "bulk"
19
- }
20
- ]
21
- }