froth-webdriverio-framework 6.0.75 → 6.0.76

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.
@@ -25,7 +25,7 @@ async function getBSBuildDetails(sessionType, bsUsername, bsPassword) {
25
25
 
26
26
  return data[0].automation_build.hashed_id;
27
27
  } else if (response.status === 401) {
28
- console.error("Unauthorized: token expired");
28
+ console.error("Unauthorized: token expired to login Browserstack for getting session info");
29
29
  } else {
30
30
  const errorText = await response.text();
31
31
  console.error(`Failed to fetch build details: ${response.status}, ${errorText}`);
@@ -66,7 +66,7 @@ async function getBSSessionDetails(sessionType, bsUsername, bsPassword) {
66
66
 
67
67
  console.log(`Public URL: ${publicUrl}`);
68
68
  } else if (response.status === 401) {
69
- console.error("Unauthorized: token expired");
69
+ console.error("Unauthorized: token expired to login Browserstack");
70
70
  } else {
71
71
  const errorText = await response.text();
72
72
  console.error(`Failed to fetch session details: ${response.status}, ${errorText}`);
@@ -31,7 +31,7 @@ module.exports = (bsCaps) => {
31
31
  'bstack:options': {
32
32
  os: bsCaps.os,
33
33
  osVersion: bsCaps.osVersion,
34
- // buildName: 'Web_Build-',
34
+ buildName: 'Web_Build-',
35
35
  debug: bsCaps.debug,
36
36
  networkLogs: bsCaps.networkLogs,
37
37
  interactiveDebugging: bsCaps.interactiveDebugging,
@@ -152,6 +152,8 @@ const commonHooks = {
152
152
  console.log('final cinfig dteials :' + JSON.stringify(capabilities))
153
153
 
154
154
  console.log("config details " + JSON.stringify(config))
155
+ process.env.BROWSERSTACK_USERNAME = config.userName
156
+ process.env.BROWSERSTACK_ACCESS_KEY = config.accessKey
155
157
 
156
158
 
157
159
  } catch (error) {
@@ -194,7 +196,8 @@ const commonHooks = {
194
196
 
195
197
  if (!passed) {
196
198
  resultdetails.comments.push(`${test.title} - ${error?.message || 'Failed'}`);
197
- }
199
+ }else
200
+ resultdetails.comments.push(`${test.title} - 'Passed'}`);
198
201
 
199
202
  const suiteDetails = JSON.parse(BUFFER.getItem('FROTHE_SUITE_DETAILS'));
200
203
  const script = suiteDetails.find(s => s.scriptName === fileName.replace('.js', ''));
@@ -223,21 +226,7 @@ const commonHooks = {
223
226
  console.log('==== AFTER SESSION ====');
224
227
  // Do not calculate time here; we will use WDIO's total duration in onComplete
225
228
  console.log('⏱ Leaving execution time calculation for onComplete hook');
226
- // const endTime = Date.now();
227
- // if (!suiteStartTime) suiteStartTime = endTime;
228
-
229
- // const totalTime = Math.max(endTime - suiteStartTime, totalTestDuration);
230
- // // resultdetails.excution_status = exitCode === 0 ? 'PASSED' : 'FAILED';
231
- // resultdetails.excution_time = msToTime(totalTime);
232
-
233
- // console.log('⏱ Final execution time:', resultdetails.excution_time);
234
-
235
- // console.log('📤 Updating DB with final execution details');
236
- // console.log('Status:', resultdetails.excution_status);
237
- // console.log('Duration:', resultdetails.excution_time);
238
-
239
- // await safeUpdateExecution();
240
- // BUFFER.clear();
229
+
241
230
  },
242
231
 
243
232
  /* ========== ON ERROR ========== */
@@ -261,7 +250,6 @@ const commonHooks = {
261
250
  },
262
251
  /* ========== ON COMPLETE ========== */
263
252
  onComplete: async (exitCode, _, __, results) => {
264
- console.log('==== ON COMPLETE ====');
265
253
  console.log('==== ON COMPLETE ====');
266
254
  console.log(`Total: ${results.total || 0}, Passed: ${results.passed || 0}, Failed: ${results.failed || 0}`);
267
255
 
@@ -18,6 +18,7 @@ try {
18
18
  }
19
19
  const ymlPath = path.resolve(process.cwd(), configFile);
20
20
  bsCaps = yaml.load(fs.readFileSync(ymlPath, 'utf8'));
21
+
21
22
  // Merge chrome-specific options if applicable
22
23
 
23
24
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "6.0.75",
3
+ "version": "6.0.76",
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": {