froth-webdriverio-framework 3.0.141 → 3.0.142

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.
@@ -14,7 +14,7 @@ const resultdetails = {
14
14
  excution_status: 'SKIPPED', // Pass/Fail
15
15
  excution_time: 0, // Execution time in milliseconds
16
16
  };
17
- global.suite_info = null;
17
+ let suite_info = null;
18
18
  // Description: This file contains the common configuration for the webdriverio framework.
19
19
  const commonconfig = {
20
20
 
@@ -28,9 +28,9 @@ const commonconfig = {
28
28
  await setAllDetails.setExecutionDetails();
29
29
 
30
30
  // await setAllDetails.setIntegrationsDetails();
31
- global.suite_info= await setAllDetails.setSuiteDetails();
32
- console.log("First Log - suite_info:", JSON.stringify(global.suite_info));
33
- console.log("Type:", typeof global.suite_info); // Check if it's object, undefined, or something else
31
+ suite_info= await setAllDetails.setSuiteDetails();
32
+ console.log("First Log - suite_info:", JSON.stringify(suite_info));
33
+ console.log("Type:", typeof suite_info); // Check if it's object, undefined, or something else
34
34
  await setAllDetails.setTestDataDetails();
35
35
  console.log("on prepare:", JSON.stringify(capabilities))
36
36
 
@@ -46,6 +46,7 @@ const commonconfig = {
46
46
  try {
47
47
  console.log('==== BEFORE SESSION HOOK ====');
48
48
  // Perform any setup or pre-test actions here
49
+ console.log("before session Log - suite_info:", JSON.stringify(suite_info));
49
50
 
50
51
  console.log("specdat:", specs);
51
52
  console.log("length:", specs.length);
@@ -88,6 +89,7 @@ const commonconfig = {
88
89
  beforeSuite: async function (suite) {
89
90
  try {
90
91
  console.log('==== BEFORE SUITE HOOK ====');
92
+ console.log("before suite Log - suite_info:", JSON.stringify(suite_info));
91
93
 
92
94
  console.log(`====> Test suite has been started ' ${suite.title}' `,);
93
95
 
@@ -110,8 +112,11 @@ const commonconfig = {
110
112
  * @param {object} test test object
111
113
  * @param {object} context scope object the test was executed with
112
114
  */
113
- beforeTest: function (test, context) {
115
+ beforeTest: async function (test, context) {
116
+
114
117
  console.log('==== BEFORE TEST HOOK ====');
118
+ console.log("before test Log - suite_info:", JSON.stringify(suite_info));
119
+
115
120
  console.log(`====> Test Started '${test.title}'`);
116
121
 
117
122
  // console.log("File Name:", test.file);
@@ -131,6 +136,7 @@ const commonconfig = {
131
136
  */
132
137
  afterTest: async function (test, context, { error, result, duration, passed, retries }) {
133
138
  console.log('==== AFTER TEST HOOK ====');
139
+ console.log("after test Log - suite_info:", JSON.stringify(suite_info));
134
140
 
135
141
  console.log(`====> Test name finished '${test.title}'`);
136
142
 
@@ -156,9 +162,9 @@ const commonconfig = {
156
162
 
157
163
  // scriptresult = "FAILED"
158
164
  }
159
- let suite_info1= JSON.stringify(global.suite_info);
165
+ let suite_info1= JSON.stringify(suite_info);
160
166
  console.log("Second Log - suite_info:", suite_info1)
161
- const jwtScript = global.suite_info.script_details.find(script => script.scriptName === fileName.replace(".js", ""));
167
+ const jwtScript = suite_info.script_details.find(script => script.scriptName === fileName.replace(".js", ""));
162
168
  console.log("jwtScript:", jwtScript);
163
169
  if (jwtScript) {
164
170
  console.log("Script ID:", jwtScript.scriptId);
@@ -181,8 +187,9 @@ const commonconfig = {
181
187
  * Hook that gets executed after the suite has ended (in Mocha/Jasmine only).
182
188
  * @param {object} suite suite details
183
189
  */
184
- afterSuite: function (suite) {
190
+ afterSuite: async function (suite) {
185
191
  console.log('==== AFTER SUITE HOOK ====');
192
+ console.log("after suite Log - suite_info:", JSON.stringify(suite_info));
186
193
 
187
194
  console.log(`====> Test suite has completed '${suite.title}'`);
188
195
  },
@@ -195,6 +202,7 @@ const commonconfig = {
195
202
  */
196
203
  after: async function (result, config, capabilities, specs) {
197
204
  console.log('==== AFTER HOOK ====');
205
+ console.log("after Log - suite_info:", JSON.stringify(suite_info));
198
206
 
199
207
  console.log('====> All tests are completed.' + result);
200
208
 
@@ -219,6 +227,7 @@ const commonconfig = {
219
227
 
220
228
  afterSession: async function (config, capabilities, specs) {
221
229
  console.log('==== AFTER SESSION HOOK ====');
230
+ console.log("after session Log - suite_info:", JSON.stringify(suite_info));
222
231
 
223
232
  console.log('====> This is the aftersession hook');
224
233
  // Perform any cleanup or post-test actions here
@@ -256,6 +265,7 @@ const commonconfig = {
256
265
 
257
266
  onComplete: async function (exitCode, config, capabilities, results) {
258
267
  console.log('==== ON COMPLETE HOOK ====');
268
+ console.log("on complete Log - suite_info:", JSON.stringify(suite_info));
259
269
 
260
270
  console.log('====> Results:', results);
261
271
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.141",
3
+ "version": "3.0.142",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",