froth-webdriverio-framework 7.0.36 → 7.0.38
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.
|
@@ -47,18 +47,18 @@ async function getExecuitonDetails(frothUrl, token, id) {
|
|
|
47
47
|
headers: DEFAULT_HEADERS(token)
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
const data = await handleResponse(response, 'getExecuitonDetails');
|
|
51
|
-
if (!data) return null;
|
|
50
|
+
// const data = await handleResponse(response, 'getExecuitonDetails');
|
|
51
|
+
// if (!data) return null;
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
//
|
|
53
|
+
let data = await handleResponse(response, 'getExecuitonDetails');
|
|
54
|
+
// let responseData = await response.json()
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
//
|
|
56
|
+
data = await aes.decrpytData(data.data)
|
|
57
|
+
// console.log("after decrypting",data)
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
59
|
+
data = JSON.parse(data)
|
|
60
|
+
// console.log("json parsing",data)
|
|
61
|
+
if (!data) return null;
|
|
62
62
|
|
|
63
63
|
const jsondata = {
|
|
64
64
|
automation_suite_id: data?.automation_suite_details?.id ?? null,
|
|
@@ -29,24 +29,24 @@ async function getSuiteDetails(frothUrl, token, suiteId) {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
const data = await handleResponse(response, 'getExecuitonDetails');
|
|
33
|
-
if (!data) return null;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
// const data = await handleResponse(response, 'getExecuitonDetails');
|
|
33
|
+
// if (!data) return null;
|
|
34
|
+
|
|
35
|
+
let resData = await handleResponse(response, 'getSuiteDetails');
|
|
36
|
+
if (!resData || !resData.data) return jsonData;
|
|
37
|
+
|
|
38
|
+
// Decrypt the data
|
|
39
|
+
let decryptedData = await aes.decrpytData(resData.data);
|
|
40
|
+
if (!decryptedData) return jsonData;
|
|
41
|
+
|
|
42
|
+
// Parse JSON
|
|
43
|
+
let data;
|
|
44
|
+
try {
|
|
45
|
+
data = JSON.parse(decryptedData);
|
|
46
|
+
} catch (parseError) {
|
|
47
|
+
console.error('Failed to parse decrypted data:', parseError);
|
|
48
|
+
return jsonData;
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
// Map data to default structure
|
|
52
52
|
jsonData = {
|
|
@@ -270,7 +270,9 @@ const commonHooks = {
|
|
|
270
270
|
const endTime = Date.now();
|
|
271
271
|
const totalTime = endTime - suiteStartTime; // Full WDIO+CI elapsed time
|
|
272
272
|
resultdetails.excution_time = await msToTime(totalTime);
|
|
273
|
+
|
|
273
274
|
console.log("Exit code after session===>" + exitCode)
|
|
275
|
+
exitCode = exitCode ?? 0;
|
|
274
276
|
resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
|
|
275
277
|
|
|
276
278
|
console.log('Comments being sent:', resultdetails.comments);
|