testaro 33.1.0 → 33.1.3

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
@@ -142,8 +142,6 @@ Here is an example of a job:
142
142
  what: 'Test W3C with 2 alfa rules',
143
143
  strict: true,
144
144
  timeLimit: 65,
145
- standard: 'only',
146
- observe: false,
147
145
  acts: [
148
146
  {
149
147
  type: 'launch',
@@ -168,6 +166,8 @@ Here is an example of a job:
168
166
  },
169
167
  requester: 'user@domain.org'
170
168
  },
169
+ standard: 'only',
170
+ observe: false,
171
171
  timeStamp: '241208T1200',
172
172
  creationTimeStamp: '241114T0328',
173
173
  sendReportTo: 'https://localhost:3004/testapp/api/report',
@@ -184,11 +184,11 @@ Job properties:
184
184
  - `what`: a description of the job.
185
185
  - `strict`: `true` or `false`, indicating whether _substantive redirections_ should be treated as failures. These are redirections that do more than add or subtract a final slash.
186
186
  - `timeLimit`: the number of seconds allowed for the execution of the job.
187
+ - `acts`: an array of the acts to be performed (documented below).
187
188
  - `standard`: `'also'`, `'only'`, or `'no'`, indicating whether rule-violation instances are to be reported in tool-native formats and also in the Testaro standard format, only in the standard format, or only in the tool-native formats.
188
- - `observe`: `true` or `false`, indicating whether tool and Testaro-rule invocations are to be reported as they occur to the server.
189
+ - `observe`: `true` or `false`, indicating whether tool and Testaro-rule invocations are to be reported to the server as they occur, so that the server can update a waiting client.
189
190
  - `timeStamp`: a string in `yymmddThhMM` format, specifying a date and time before which the job is not to be performed.
190
191
  - `creationTimeStamp`: a string in `yymmddThhMM` format, describing when the job was created.
191
- - `acts`: an array of the acts to be performed (documented below).
192
192
  - `sources`: an object describing where the job came from:
193
193
  - `script`: the ID of the script (as used by Testilo) from which the job was made, or an empty string if none.
194
194
  - `batch` : the ID of the batch (as used by Testilo) from which the target of this job was drawn, or an empty string if none.
@@ -197,7 +197,7 @@ Job properties:
197
197
  - `creationTimeStamp`: the date and time in `yymmddThhMM` format when the job was created.
198
198
  - `timeStamp`: the date and time in `yymmddThhMM` format before which the job is not to be assigned.
199
199
  - `sendReportTo`: the URL to which the report of the job is to be sent, or an empty string if the report is not to be sent to a server.
200
- - `mergeID`: a randomly generated alphanumeric ID for the process (such as a merger, as performed by Testilo, of a script and a batch) that created the job, or an empty string if none.
200
+ - `mergeID`: a randomly generated alphanumeric ID for the process (such as a Testilo merger of a script and a batch) that created the job, or an empty string if none.
201
201
 
202
202
  ### Reports
203
203
 
@@ -890,7 +890,7 @@ The Playwright “Receives Events” actionability check does **not** check whet
890
890
 
891
891
  Test targets employ mechanisms to prevent scraping, automated form submission, and other automated actions. These mechanisms may interfere with testing. When a test act is prevented by a target, Testaro reports this prevention.
892
892
 
893
- Some targets prohibit the execution of alien scripts unless the client can demonstrate that it is the requester of the page. Failure to provide that evidence results in the script being blocked and an error message being logged, saying “Refused to execute a script because its hash, its nonce, or unsafe-inline does not appear in the script-src directive of the Content Security Policy”. This mechanism affects tools that insert scripts into a target in order to test it. Those tools include `axe`, `asLint`, `ed11y`, and `htmlcs`. To comply with this requirement, Testaro obtains a _nonce_ from the response that serves the target. Then the file that runs the tool adds that nonce to the script as the value of a `nonce` attribute when it inserts its script into the target.
893
+ Some targets prohibit the execution of alien scripts unless the client can demonstrate that it is the requester of the page. Failure to provide that evidence results in the script being blocked and an error message being logged, saying “Refused to execute a script because its hash, its nonce, or unsafe-inline does not appear in the script-src directive of the Content Security Policy”. This mechanism affects tools that insert scripts into a target in order to test it. Those tools include `axe`, `aslint`, `ed11y`, and `htmlcs`. To comply with this requirement, Testaro obtains a _nonce_ from the response that serves the target. Then the file that runs the tool adds that nonce to the script as the value of a `nonce` attribute when it inserts its script into the target.
894
894
 
895
895
  ### Tool duplicativity
896
896
 
@@ -913,12 +913,12 @@ The files in the `temp` directory are presumed ephemeral and are not tracked by
913
913
  ## Related packages
914
914
 
915
915
  [Testilo](https://www.npmjs.com/package/testilo) is an application that:
916
- - merges batches of targets and scripts to produce jobs
916
+ - converts lists of targets and lists of issues into jobs
917
917
  - produces scores and adds them to the raw reports of Testaro
918
918
  - produces human-oriented HTML digests from scored reports
919
919
  - produces human-oriented HTML comparisons of the scores of targets
920
920
 
921
- Testilo contains procedures that reorganize report data by defect rather than tool, and that compensate for duplicative tests when computing scores.
921
+ Testilo contains procedures that reorganize report data by issue rather than tool, and that compensate for duplicative tests when computing scores.
922
922
 
923
923
  Testaro is derived from [Autotest](https://github.com/jrpool/autotest). Autotest was created as a monolithic accessibility testing package, but that forced functionalities to be hosted on a workstation merely because it was impractical to host Playwright elsewhere. Testaro embodies an architectural decision to isolate workstation-dependent functionalities.
924
924
 
@@ -934,14 +934,14 @@ The JavaScript code in this project generally conforms to the ESLint configurati
934
934
 
935
935
  ## Origin
936
936
 
937
- Work on the custom tests in this package began in 2017, and work on the multi-package federation that Testaro implements began in early 2018. These two aspects were combined into the [Autotest](https://github.com/jrpool/autotest) package in early 2021 and into the more single-purpose packages, Testaro and Testilo, in January 2022.
937
+ Work on the custom tests in this package began in 2017, and work on the multi-package ensemble that Testaro implements began in early 2018. These two aspects were combined into the [Autotest](https://github.com/jrpool/autotest) package in early 2021 and into the more single-purpose packages, Testaro and Testilo, in January 2022.
938
938
 
939
939
  ## Etymology
940
940
 
941
941
  “Testaro” means “collection of tests” in Esperanto.
942
942
 
943
943
  /*
944
- © 2021–2023 CVS Health and/or one of its affiliates. All rights reserved.
944
+ © 2021–2024 CVS Health and/or one of its affiliates. All rights reserved.
945
945
 
946
946
  Permission is hereby granted, free of charge, to any person obtaining a copy
947
947
  of this software and associated documentation files (the "Software"), to deal
package/call.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2022–2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2022–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
package/dirWatch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2023–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
package/netWatch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2022–2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2022–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "33.1.0",
3
+ "version": "33.1.3",
4
4
  "description": "Run 1000 web accessibility tests from 10 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2023–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2023–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
package/run.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2021–2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2021–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
package/tests/wave.js CHANGED
@@ -63,15 +63,21 @@ exports.reporter = async (page, options) => {
63
63
  delete categories.aria;
64
64
  // If rules were specified:
65
65
  if (rules && rules.length) {
66
- // Delete the results of tests for other rules.
66
+ // For each WAVE rule category:
67
67
  ['error', 'contrast', 'alert'].forEach(category => {
68
+ // If any violations were reported:
68
69
  if (
69
70
  categories[category]
70
71
  && categories[category].items
71
72
  && Object.keys(categories[category].items).length
72
73
  ) {
74
+ // For each rule violated:
73
75
  Object.keys(categories[category].items).forEach(ruleID => {
76
+ // If it was not a specified rule:
74
77
  if (! rules.includes(ruleID)) {
78
+ // Decrease the category violation count by the count of its violations.
79
+ categories[category].count -= categories[category].items[ruleID].count;
80
+ // Remove its violations from the report.
75
81
  delete categories[category].items[ruleID];
76
82
  }
77
83
  });
package/watch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- © 2022–2023 CVS Health and/or one of its affiliates. All rights reserved.
2
+ © 2022–2024 CVS Health and/or one of its affiliates. All rights reserved.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal