froth-webdriverio-framework 4.0.49 → 4.0.51

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.
@@ -239,7 +239,7 @@ const commonconfig = {
239
239
  });
240
240
 
241
241
  }
242
-
242
+
243
243
  },
244
244
 
245
245
  afterSession: async function (config, capabilities, specs) {
@@ -269,25 +269,27 @@ const commonconfig = {
269
269
  resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
270
270
  const frothDuration = BUFFER.getItem("FROTH_TOTAL_DURATION");
271
271
 
272
- if(await isInvalidDuration(frothDuration)){
273
- console.log("inside froth duration");
272
+ if (await isInvalidDuration(frothDuration)) {
273
+ // console.log("inside froth duration");
274
274
  if (await isInvalidDuration(duration_tests)) {
275
275
  console.log("inside froth duration_tests");
276
-
277
- resultdetails.excution_time = await convertTimetoHHMMSS(totalDuration);
276
+ resultdetails.excution_time = await millisecondsToTime(totalDuration);
278
277
  } else {
279
- console.log("inside froth totalDuration");
280
- resultdetails.excution_time = await millisecondsToTime(duration_tests);
278
+ console.log("inside froth duration_tests comparision");
279
+ if (totalDuration > duration_tests)
280
+ resultdetails.excution_time = await millisecondsToTime(totalDuration);
281
+ else
282
+ resultdetails.excution_time = await millisecondsToTime(duration_tests);
281
283
  }
282
284
  } else {
283
285
  console.log("inside froth duration else");
284
286
  resultdetails.excution_time = await secondsToTime(frothDuration);
285
287
  }
286
288
 
287
- console.log("====> Total Duration calculation:" +resultdetails.excution_time);
288
-
289
+ console.log("====> Total Duration calculation:" + resultdetails.excution_time);
290
+
289
291
  await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
290
-
292
+
291
293
  // Perform any cleanup or post-test actions here
292
294
  BUFFER.clear();
293
295
  },
@@ -316,7 +318,7 @@ async function isInvalidDuration(val) {
316
318
  val = val.trim().toLowerCase();
317
319
  isValid = val === "null" || val === "0" || val === "undefined";
318
320
 
319
- }else
321
+ } else
320
322
  isValid = val === null || val === 0 || val === undefined;
321
323
 
322
324
  console.log("isValid in isValidDuration:" + isValid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.49",
3
+ "version": "4.0.51",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",