froth-webdriverio-framework 4.0.42 → 4.0.43
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.
|
@@ -11,7 +11,7 @@ const { error } = require('console');
|
|
|
11
11
|
//const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
12
12
|
let starttime;
|
|
13
13
|
let endtime;
|
|
14
|
-
let duration_tests=
|
|
14
|
+
let duration_tests=0;
|
|
15
15
|
console.log('===== common config===== ');
|
|
16
16
|
const resultdetails = {
|
|
17
17
|
comments: [],
|
|
@@ -281,12 +281,15 @@ const commonconfig = {
|
|
|
281
281
|
|
|
282
282
|
resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
|
|
283
283
|
|
|
284
|
-
console.log("====> Total Duration calculation:" +
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
284
|
+
console.log("====> Total Duration calculation:" +
|
|
285
|
+
(await isValidDuration(BUFFER.getItem("FROTH_TOTAL_DURATION"))
|
|
286
|
+
? (await isValidDuration(duration_tests) ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(duration_tests))
|
|
287
|
+
: await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))));
|
|
288
|
+
|
|
289
|
+
resultdetails.excution_time = await isValidDuration(BUFFER.getItem("FROTH_TOTAL_DURATION"))
|
|
290
|
+
? (await isValidDuration(duration_tests) ? await convertTimetoHHMMSS(totalDuration) : await secondsToTime(duration_tests))
|
|
291
|
+
: await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"));
|
|
292
|
+
|
|
290
293
|
await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
|
|
291
294
|
BUFFER.clear();
|
|
292
295
|
|
|
@@ -295,8 +298,11 @@ const commonconfig = {
|
|
|
295
298
|
}
|
|
296
299
|
|
|
297
300
|
};
|
|
298
|
-
|
|
301
|
+
async function isValidDuration(val) {
|
|
302
|
+
return val === null && val === 0 && val === undefined;
|
|
303
|
+
}
|
|
299
304
|
async function secondsToTime(secs) {
|
|
305
|
+
console.log("secs in secondsToTime :" + secs);
|
|
300
306
|
let hours = Math.floor(secs / 3600);
|
|
301
307
|
let minutes = Math.floor((secs % 3600) / 60);
|
|
302
308
|
let seconds = secs % 60;
|