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 +1 -1
- package/procs/identify.js +9 -2
- package/run.js +1 -1
- package/tests/aslint.js +2 -2
package/package.json
CHANGED
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
|
|
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
|
-
|
|
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
|