froth-webdriverio-framework 4.0.15 → 4.0.16

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.
@@ -139,30 +139,27 @@ const commonconfig = {
139
139
  console.log(`====> Status of test: ${passed}`);
140
140
 
141
141
  let scriptresult = "NOT RUN";
142
+ let localError = null;
142
143
 
143
144
  if (browser.testError) {
144
145
  console.error("Test Error:", browser.testError);
145
- const err = browser.testError;
146
- resultdetails.comments.push(`${test.title} - failed: ${err}`);
146
+ localError = browser.testError;
147
+ resultdetails.comments.push(`${test.title} - failed: ${localError}`);
147
148
  browser.testError = null; // clear it
148
- throw err; // causes test to fail after execution
149
+ scriptresult = "FAILE"
150
+ // throw err; // causes test to fail after execution
149
151
  }
150
- if (passed) {
152
+ if (passed && !localError ) {
151
153
  scriptresult = "PASSED"
152
154
  resultdetails.comments.push(`${test.title} - passed`);
153
155
  }
154
- else {
156
+ else if (!passed && error) {
157
+ console.error(`========= Failed or Error occured while executing the test: ${error.message}`);
155
158
  scriptresult = "FAILED"
156
159
  if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
157
160
  resultdetails.comments.push(`${test.title} - failed: ${error.message}`);
158
161
  }
159
- if (error) {
160
- console.error(`========= Error occured while executing the test: ${error.message}`);
161
- if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
162
- resultdetails.comments.push(`${test.title} - error occured: ${error.message}`);
163
-
164
- scriptresult = "FAILED"
165
- }
162
+
166
163
  let scriptDetails = BUFFER.getItem("FROTHE_SUITE_DETAILS");
167
164
  if (typeof scriptDetails === "string") {
168
165
  scriptDetails = JSON.parse(scriptDetails);
@@ -213,7 +210,7 @@ const commonconfig = {
213
210
  console.error("Uncaught Exception:", err);
214
211
  resultdetails.comments.push(`Execution failed : ${err}`);
215
212
  });
216
-
213
+
217
214
  }
218
215
  resultdetails.excution_time = await secondsToTime(BUFFER.getItem("FROTH_TOTAL_DURATION"))
219
216
  await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.15",
3
+ "version": "4.0.16",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",