testaro 32.2.1 → 32.2.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "32.2.1",
3
+ "version": "32.2.2",
4
4
  "description": "Run 960 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -422,6 +422,8 @@ const launch = async (report, typeName, url, debug, waits, isLowMotion = false)
422
422
  // Open a context (i.e. browser tab), with reduced motion if specified.
423
423
  const options = {reduceMotion: isLowMotion ? 'reduce' : 'no-preference'};
424
424
  const browserContext = await browser.newContext(options);
425
+ // Prevent default timeouts, including those arising from a Playwright bug.
426
+ browserContext.setDefaultTimeout(0);
425
427
  // When a page (i.e. browser tab) is added to the browser context (i.e. browser window):
426
428
  browserContext.on('page', async page => {
427
429
  // If it emits a message:
package/tests/qualWeb.js CHANGED
@@ -42,6 +42,7 @@ const clusterOptions = {
42
42
  exports.reporter = async (page, options) => {
43
43
  const {withNewContent, rules} = options;
44
44
  const data = {};
45
+ let result = {};
45
46
  // Start the QualWeb core engine.
46
47
  await qualWeb.start(clusterOptions);
47
48
  // Specify the invariant test options.
@@ -126,7 +127,7 @@ exports.reporter = async (page, options) => {
126
127
  // Get the report.
127
128
  let actReports = await qualWeb.evaluate(qualWebOptions);
128
129
  // Remove the copy of the DOM from it.
129
- const result = actReports[withNewContent ? qualWebOptions.url : 'customHtml'];
130
+ result = actReports[withNewContent ? qualWebOptions.url : 'customHtml'];
130
131
  if (result && result.system && result.system.page && result.system.page.dom) {
131
132
  delete result.system.page.dom;
132
133
  // For each test section of the act report:
@@ -202,8 +203,13 @@ exports.reporter = async (page, options) => {
202
203
  };
203
204
  }
204
205
  catch(error) {
206
+ const message = error.message.slice(0, 200);
205
207
  data.prevented = true;
206
- data.error = error.message.slice(0, 200);
208
+ data.error = message;
209
+ result = {
210
+ prevented: true,
211
+ error: message
212
+ };
207
213
  };
208
214
  return {
209
215
  data,