@auxcode/auxta 0.4.0 → 0.4.1
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
|
@@ -43,11 +43,7 @@ export async function onTestEnd(body: any, featureName: string, scenarioName: st
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
if (isFinal) await afterComplete(body);
|
|
46
|
-
else if (body && body.nextSuites
|
|
47
|
-
try {
|
|
48
|
-
await startSuite(body.nextSuites, body.reportId);
|
|
49
|
-
} catch {
|
|
50
|
-
}
|
|
46
|
+
else if (body && body.nextSuites) await startSuite(body.nextSuites, body.reportId);
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
export async function afterComplete(body: UploadModel) {
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { config } from "../configs/config";
|
|
3
3
|
|
|
4
|
-
export function startSuite(suites: string[], reportId?: string) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
export async function startSuite(suites: string[], reportId?: string) {
|
|
5
|
+
if (suites.length === 0) return;
|
|
6
|
+
const next = suites.shift();
|
|
7
|
+
console.log('Starting next suite: ' + next);
|
|
8
|
+
try{
|
|
9
|
+
await axios.post(
|
|
10
|
+
`${config.netlifyPath}.netlify/functions/${next}?token=${config.token}`,
|
|
11
|
+
{nextSuites: suites, reportId: reportId})
|
|
12
|
+
} catch (e){
|
|
13
|
+
// skip the suite if not found
|
|
14
|
+
await startSuite(suites, reportId);
|
|
15
|
+
}
|
|
11
16
|
}
|
|
@@ -69,7 +69,7 @@ export class Puppeteer {
|
|
|
69
69
|
await callback(event)
|
|
70
70
|
log.push('When', `Finished puppeteer process`, StatusOfStep.PASSED);
|
|
71
71
|
} catch (err) {
|
|
72
|
-
console.log(
|
|
72
|
+
console.log("Error", err);
|
|
73
73
|
errMessage = err;
|
|
74
74
|
statusCode = 500;
|
|
75
75
|
screenshotBuffer = await captureScreenshot();
|
|
@@ -85,7 +85,7 @@ export class Puppeteer {
|
|
|
85
85
|
error: errMessage
|
|
86
86
|
});
|
|
87
87
|
} catch (e){
|
|
88
|
-
console.log(e);
|
|
88
|
+
console.log("Lib error:", e);
|
|
89
89
|
} finally {
|
|
90
90
|
log.clear();
|
|
91
91
|
}
|