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.
- package/package.json +1 -1
- package/tests/qualWeb.js +8 -4
package/package.json
CHANGED
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'
|
|
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[
|
|
67
|
-
const {assertions} = modules[
|
|
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 ${
|
|
111
|
+
report.error = `ERROR: No ${section} section`;
|
|
108
112
|
}
|
|
109
113
|
});
|
|
110
114
|
// Stop the QualWeb core engine.
|