testaro 46.0.1 → 46.0.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": "46.0.1",
3
+ "version": "46.0.2",
4
4
  "description": "Run 1000 web accessibility tests from 10 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/procs/identify.js CHANGED
@@ -28,7 +28,11 @@
28
28
  // IMPORTS
29
29
 
30
30
  // Module to get the XPath of an element.
31
- const {xPath} = require('playwright-dompath');
31
+ const getPath = {
32
+ xPath: require('playwright-dompath').xPath
33
+ };
34
+ // Utility module.
35
+ const {doBy} = require('./job');
32
36
 
33
37
  // FUNCTIONS
34
38
 
@@ -79,7 +83,10 @@ const addIDs = async (locators, recipient) => {
79
83
  }
80
84
  // Add the path ID of the element to the result if none exists yet.
81
85
  if (! recipient.pathID) {
82
- recipient.pathID = await xPath(locators);
86
+ const pathID = await doBy(1, getPath, 'xPath', [locators], 'xPath identification');
87
+ if (pathID !== 'timedOut') {
88
+ recipient.pathID = pathID;
89
+ }
83
90
  }
84
91
  }
85
92
  };
package/run.js CHANGED
@@ -659,7 +659,7 @@ const doActs = async (report, actIndex) => {
659
659
  console.log(`ERROR: Test act ${act.which} failed (${message})`);
660
660
  act.data.prevented = true;
661
661
  act.data.error = act.data.error ? `${act.data.error}; ${message}` : message;
662
- }
662
+ };
663
663
  // Add the elapsed time of the tool to the report.
664
664
  const time = Math.round((Date.now() - startTime) / 1000);
665
665
  const {toolTimes} = report.jobData;
package/tests/aslint.js CHANGED
@@ -91,7 +91,7 @@ exports.reporter = async (page, report, actIndex, timeLimit) => {
91
91
  console.log(message);
92
92
  data.prevented = true;
93
93
  data.error = `${message} (${error.message})`;
94
- }
94
+ };
95
95
  }
96
96
  // If the injection and the result attachment both succeeded:
97
97
  if (! data.prevented) {
@@ -133,7 +133,7 @@ exports.reporter = async (page, report, actIndex, timeLimit) => {
133
133
  prevented: true,
134
134
  error: message
135
135
  };
136
- }
136
+ };
137
137
  return {
138
138
  data,
139
139
  result