testilo 24.0.0 → 24.1.1
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/script.js +20 -2
package/package.json
CHANGED
package/script.js
CHANGED
|
@@ -90,8 +90,26 @@ exports.script = (id, issues = null, ... issueIDs) => {
|
|
|
90
90
|
if (issues && issueIDs.length) {
|
|
91
91
|
// Add a rules array as a property to the act.
|
|
92
92
|
toolAct.rules = neededTools[toolID];
|
|
93
|
-
// If the tool is
|
|
94
|
-
if (toolID === '
|
|
93
|
+
// If the tool is QualWeb:
|
|
94
|
+
if (toolID === 'qualWeb') {
|
|
95
|
+
// For each QualWeb module:
|
|
96
|
+
const specs = [];
|
|
97
|
+
const prefixes = {
|
|
98
|
+
act: 'QW-ACT-',
|
|
99
|
+
wcag: 'QW-WCAG-',
|
|
100
|
+
bp: 'QW-BP'
|
|
101
|
+
};
|
|
102
|
+
Object.keys(prefixes).forEach(prefix => {
|
|
103
|
+
// Specify the rules of that module to be tested for.
|
|
104
|
+
const ids = toolAct.rules.filter(id => id.startsWith(prefixes[prefix]));
|
|
105
|
+
const integers = ids.map(id => id.slice(prefixes[prefix].length));
|
|
106
|
+
specs.push(`${prefix}:${integers.join(',')}`);
|
|
107
|
+
});
|
|
108
|
+
// Replace the generic rule list with the QualWeb-format list.
|
|
109
|
+
toolAct.rules = specs;
|
|
110
|
+
}
|
|
111
|
+
// Otherwise, if the tool is Testaro:
|
|
112
|
+
else if (toolID === 'testaro') {
|
|
95
113
|
// Prepend the inclusion option to the rule array.
|
|
96
114
|
toolAct.rules.unshift('y');
|
|
97
115
|
}
|