froth-webdriverio-framework 6.0.86 → 6.0.88

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.
@@ -259,7 +259,16 @@ const commonHooks = {
259
259
  console.log('==== AFTER SESSION ====');
260
260
  // Do not calculate time here; we will use WDIO's total duration in onComplete
261
261
  console.log('⏱ Leaving execution time calculation for onComplete hook' + resultdetails.comments);
262
-
262
+ const endTime = Date.now();
263
+ const totalTime = endTime - suiteStartTime; // Full WDIO+CI elapsed time
264
+ resultdetails.excution_time = await msToTime(totalTime);
265
+ resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
266
+ console.log('Comments being sent:', resultdetails.comments);
267
+ //resultdetails.comments.push(BUFFER.getItem('ALL_COMMENTS'))
268
+ console.log('⏱ Final execution time (ms):', totalTime);
269
+ console.log('⏱ Final execution time (hh:mm:ss):', resultdetails.excution_time);
270
+ await safeUpdateExecution();
271
+ BUFFER.clear();
263
272
 
264
273
  },
265
274
 
@@ -287,29 +296,7 @@ const commonHooks = {
287
296
  console.log('==== ON COMPLETE ====');
288
297
  console.log(`Total: ${results.total || 0}, Passed: ${results.passed || 0}, Failed: ${results.failed || 0}`);
289
298
 
290
- const endTime = Date.now();
291
- const totalTime = endTime - suiteStartTime; // Full WDIO+CI elapsed time
292
299
 
293
- resultdetails.excution_time = await msToTime(totalTime);
294
- resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
295
-
296
- // const allComments = global.TEST_COMMENTS || [];
297
- // if (allComments.length === 0 && exitCode === 0) allComments.push('All tests passed ✅');
298
- // if (exitCode !== 0 && allComments.length === 0) allComments.push(`Execution failed with exit code ${exitCode}`);
299
-
300
- // resultdetails.comments = allComments;
301
- if (resultdetails.comments === null)
302
- console.log("Comments is null")
303
- else if (resultdetails.comments.length === 0)
304
- console.log("Comments is empty")
305
- else
306
- console.log('Comments being sent:', resultdetails.comments);
307
-
308
- console.log('⏱ Final execution time (ms):', totalTime);
309
- console.log('⏱ Final execution time (hh:mm:ss):', resultdetails.excution_time);
310
-
311
- await safeUpdateExecution();
312
- BUFFER.clear();
313
300
  return exitCode;
314
301
  },
315
302
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "6.0.86",
3
+ "version": "6.0.88",
4
4
  "readme": "WendriverIO Integration with [BrowserStack](https://www.browserstack.com)",
5
5
  "description": "Selenium examples for WebdriverIO and BrowserStack App Automate",
6
6
  "scripts": {