froth-webdriverio-framework 3.0.150 → 3.0.152

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.
@@ -29,10 +29,6 @@ const commonconfig = {
29
29
 
30
30
  // await setAllDetails.setIntegrationsDetails();
31
31
  await setAllDetails.setSuiteDetails();
32
- console.log("First Log - suite_info:", process.env.FROTHSSCRIPT_DETAILS);
33
-
34
- console.log("First Log - suite_info:", JSON.stringify(process.env.FROTHSSCRIPT_DETAILS));
35
- console.log("Type:", typeof suite_info); // Check if it's object, undefined, or something else
36
32
  await setAllDetails.setTestDataDetails();
37
33
  console.log("on prepare:", JSON.stringify(capabilities))
38
34
 
@@ -48,8 +44,6 @@ const commonconfig = {
48
44
  try {
49
45
  console.log('==== BEFORE SESSION HOOK ====');
50
46
  // Perform any setup or pre-test actions here
51
- console.log("DEBUG: Checking global.suite_info in beforeSession", JSON.stringify(process.env.FROTHSSCRIPT_DETAILS));
52
-
53
47
  console.log("specdat:", specs);
54
48
  console.log("length:", specs.length);
55
49
 
@@ -70,7 +64,7 @@ const commonconfig = {
70
64
 
71
65
  console.log(`Running tests on after app,bslocal,mediafiles: ${JSON.stringify(capabilities)}`);
72
66
  }
73
-
67
+
74
68
  } catch (error) {
75
69
  console.error('🚨 Error in beforeSession:', error);
76
70
  console.error('🚨 Error in beforeSession:', error.message);
@@ -91,8 +85,6 @@ const commonconfig = {
91
85
  beforeSuite: async function (suite) {
92
86
  try {
93
87
  console.log('==== BEFORE SUITE HOOK ====');
94
- console.log("before suite Log - suite_info:", JSON.stringify(global.suite_info));
95
-
96
88
  console.log(`====> Test suite has been started ' ${suite.title}' `,);
97
89
 
98
90
  starttime = new Date().getTime();
@@ -117,8 +109,6 @@ const commonconfig = {
117
109
  beforeTest: async function (test, context) {
118
110
 
119
111
  console.log('==== BEFORE TEST HOOK ====');
120
- console.log("before test Log - suite_info:", JSON.stringify(global.suite_info));
121
-
122
112
  console.log(`====> Test Started '${test.title}'`);
123
113
 
124
114
  // console.log("File Name:", test.file);
@@ -138,8 +128,6 @@ const commonconfig = {
138
128
  */
139
129
  afterTest: async function (test, context, { error, result, duration, passed, retries }) {
140
130
  console.log('==== AFTER TEST HOOK ====');
141
- console.log("after test Log - suite_info:", JSON.stringify(global.suite_info));
142
-
143
131
  console.log(`====> Test name finished '${test.title}'`);
144
132
 
145
133
  const fileName = path.basename(test.file);
@@ -164,10 +152,10 @@ const commonconfig = {
164
152
 
165
153
  // scriptresult = "FAILED"
166
154
  }
167
- console.log("Second Log - suite_info:", process.env.FROTHSSCRIPT_DETAILS)
168
- const scriptArray = Object.values(process.env.FROTHSSCRIPT_DETAILS);
169
- console.log("Converted array:", scriptArray);
170
- const jwtScript = scriptArray.find(s => s.scriptName === fileName.replace(".js", ""));
155
+ const scriptDetails = BUFFER.getItem("FROTHE_SUITE_DETAILS");
156
+ console.log("Script Details in After Hook:", JSON.stringify(scriptDetails, null, 2));
157
+ const jwtScript = scriptDetails.find(s => s.scriptName === fileName.replace(".js", ""));
158
+
171
159
  console.log("jwtScript:", jwtScript);
172
160
  if (jwtScript) {
173
161
  console.log("Script ID:", jwtScript.scriptId);
@@ -192,8 +180,6 @@ const commonconfig = {
192
180
  */
193
181
  afterSuite: async function (suite) {
194
182
  console.log('==== AFTER SUITE HOOK ====');
195
- console.log("after suite Log - suite_info:", JSON.stringify(global.suite_info));
196
-
197
183
  console.log(`====> Test suite has completed '${suite.title}'`);
198
184
  },
199
185
  /**
@@ -205,8 +191,6 @@ const commonconfig = {
205
191
  */
206
192
  after: async function (result, config, capabilities, specs) {
207
193
  console.log('==== AFTER HOOK ====');
208
- console.log("after Log - suite_info:", JSON.stringify(global.suite_info));
209
-
210
194
  console.log('====> All tests are completed.' + result);
211
195
 
212
196
  BUFFER.setItem("RESULT_DATA", result);
@@ -230,8 +214,6 @@ const commonconfig = {
230
214
 
231
215
  afterSession: async function (config, capabilities, specs) {
232
216
  console.log('==== AFTER SESSION HOOK ====');
233
- console.log("after session Log - suite_info:", JSON.stringify(global.suite_info));
234
-
235
217
  console.log('====> This is the aftersession hook');
236
218
  // Perform any cleanup or post-test actions here
237
219
  // console.log("Capabilities:", capabilities);
@@ -268,8 +250,6 @@ const commonconfig = {
268
250
 
269
251
  onComplete: async function (exitCode, config, capabilities, results) {
270
252
  console.log('==== ON COMPLETE HOOK ====');
271
- console.log("on complete Log - suite_info:", JSON.stringify(global.suite_info));
272
-
273
253
  console.log('====> Results:', results);
274
254
 
275
255
  console.log('==== Test Results Summary ======');
@@ -77,9 +77,11 @@ async function setSuiteDetails() {
77
77
  try {
78
78
  const getSuiteDetail = await getSuiteDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), process.env.AUTOMATION_SUITE_ID);
79
79
  // process.env.BROWSERSTACK_APP_PATH = getSuiteDetail.browser_stack_urls;
80
- process.env.FROTHSSCRIPT_DETAILS=getSuiteDetail.script_details;
81
- console.log("Suite Details:", process.env.FROTHSSCRIPT_DETAILS);
82
- console.log("Suite Details:", JSON.stringify( process.env.FROTHSSCRIPT_DETAILS));
80
+ BUFFER.setItem("FROTHE_SUITE_DETAILS",getSuiteDetail.script_details)
81
+ console.log("Script Details:", JSON.stringify(getSuiteDetail.script_details, null, 2));
82
+ const scriptDetails = BUFFER.getItem("FROTHE_SUITE_DETAILS");
83
+ console.log("Script Details in After Hook:", JSON.stringify(scriptDetails, null, 2));
84
+
83
85
  process.env.TESTDATA_ID = getSuiteDetail.test_data_id;
84
86
  return getSuiteDetail;
85
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.150",
3
+ "version": "3.0.152",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",