froth-webdriverio-framework 6.0.87 → 7.0.0

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
- BUFFER.setItem('ALL_COMMENTS', resultdetails.comments);
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,32 +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
- console.log('Comments being sent:', BUFFER.getItem('ALL_COMMENTS'));
297
- resultdetails.comments.push(BUFFER.getItem('ALL_COMMENTS'))
298
- console.log('⏱ Final execution time (ms):', totalTime);
299
- console.log('⏱ Final execution time (hh:mm:ss):', resultdetails.excution_time);
300
-
301
- const allComments = [];
302
- for (const runnerId in results.runners) {
303
- const runner = results.runners[runnerId];
304
- if (runner.tests) {
305
- runner.tests.forEach(t => {
306
- const msg = t.error ? `${t.title} - ${t.error.message}` : `${t.title} - Passed`;
307
- allComments.push(msg);
308
- });
309
- }
310
- }
311
- resultdetails.comments = allComments;
312
- console.log('Comments being sent before and aftersession:', resultdetails.comments );
313
-
314
- await safeUpdateExecution();
315
- BUFFER.clear();
316
300
  return exitCode;
317
301
  },
318
302
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "6.0.87",
3
+ "version": "7.0.0",
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": {