testaro 70.0.1 → 70.0.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/package.json +1 -1
- package/tests/alfa.js +10 -2
- package/tests/wave.js +8 -3
package/package.json
CHANGED
package/tests/alfa.js
CHANGED
|
@@ -140,9 +140,17 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
catch(error) {
|
|
143
|
-
console.log(`ERROR: Navigation to URL timed out (${error})`);
|
|
144
143
|
data.prevented = true;
|
|
145
|
-
|
|
144
|
+
const {message} = error;
|
|
145
|
+
if (message) {
|
|
146
|
+
if (message.includes('Unsupported node of type: 4')) {
|
|
147
|
+
data.error = 'Alfa cannot test page because it contains CDATA';
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
data.error = message;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
console.log(`ERROR: ${data.error}`);
|
|
146
154
|
}
|
|
147
155
|
return {
|
|
148
156
|
data,
|
package/tests/wave.js
CHANGED
|
@@ -132,9 +132,14 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
132
132
|
for (const index in selectors) {
|
|
133
133
|
const selector = selectors[index];
|
|
134
134
|
// Get the violator.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
let violator;
|
|
136
|
+
try {
|
|
137
|
+
violator = document.querySelector(selector);
|
|
138
|
+
// Concatenate its selector with its XPath in the native result.
|
|
139
|
+
selectors[index] = [selector, window.getXPath(violator) ?? ''];
|
|
140
|
+
} catch (error) {
|
|
141
|
+
console.error(`ERROR: Invalid selector: ${selector} (${error.message})`);
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
});
|
|
140
145
|
return items;
|