testaro 12.2.4 → 12.2.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/tests/qualWeb.js +8 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "12.2.4",
3
+ "version": "12.2.5",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/qualWeb.js CHANGED
@@ -60,11 +60,15 @@ exports.reporter = async (page, withNewContent, rules = null) => {
60
60
  if (report && report.system && report.system.page && report.system.page.dom) {
61
61
  delete report.system.page.dom;
62
62
  // For each section of the report:
63
- ['act-rules', 'wcag-techniques', 'best-practices'].forEach(module => {
63
+ const sections = ['act-rules'];
64
+ if (! rules) {
65
+ sections.push('wcag-techniques', 'best-practices');
66
+ }
67
+ sections.forEach(section => {
64
68
  // For each test:
65
69
  const {modules} = report;
66
- if (modules && modules[module]) {
67
- const {assertions} = modules[module];
70
+ if (modules && modules[section]) {
71
+ const {assertions} = modules[section];
68
72
  if (assertions) {
69
73
  const ruleIDs = Object.keys(assertions);
70
74
  ruleIDs.forEach(ruleID => {
@@ -104,7 +108,7 @@ exports.reporter = async (page, withNewContent, rules = null) => {
104
108
  }
105
109
  else {
106
110
  report.prevented = true;
107
- report.error = `ERROR: No ${module} module`;
111
+ report.error = `ERROR: No ${section} section`;
108
112
  }
109
113
  });
110
114
  // Stop the QualWeb core engine.