testaro 59.0.0 → 59.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/run.js +9 -4
- package/tests/testaro.js +1 -1
package/package.json
CHANGED
package/run.js
CHANGED
|
@@ -214,10 +214,15 @@ const goTo = async (report, page, url, timeout, waitUntil) => {
|
|
|
214
214
|
// Closes the current browser.
|
|
215
215
|
const browserClose = async () => {
|
|
216
216
|
if (browser) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
for (const context of browser.contexts()) {
|
|
218
|
+
try {
|
|
219
|
+
await context.close();
|
|
220
|
+
}
|
|
221
|
+
catch(error) {
|
|
222
|
+
console.log(
|
|
223
|
+
`ERROR trying to close context: ${error.message.slice(0, 200).replace(/\n.+/s, '')}`
|
|
224
|
+
);
|
|
225
|
+
}
|
|
221
226
|
}
|
|
222
227
|
await browser.close();
|
|
223
228
|
browser = null;
|
package/tests/testaro.js
CHANGED
|
@@ -221,7 +221,7 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
221
221
|
let contaminatorsStarted = false;
|
|
222
222
|
// Starting with the noncontaminators, for each rule invoked:
|
|
223
223
|
for (const rule of calledBenignRules.concat(calledContaminators)) {
|
|
224
|
-
const pageClosed = page.isClosed();
|
|
224
|
+
const pageClosed = page ? page.isClosed() : true;
|
|
225
225
|
const isContaminator = contaminators.includes(rule);
|
|
226
226
|
// If it is a contaminator other than the first one or the page has closed:
|
|
227
227
|
if (contaminatorsStarted || pageClosed) {
|