froth-webdriverio-framework 4.0.25 → 4.0.27

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.
@@ -15,7 +15,7 @@ async function assertText(elementSelector, expectedText) {
15
15
  let annotationMessage = `Assertion passed. Actual text: ${actualText}, Expected text: ${expectedText}.`;
16
16
  await amendToBrowserstack(annotationMessage, "info");
17
17
  } catch (error) {
18
- console.log(`Assertion failed. Expected text: ,${expectedText}.`);
18
+ console.log(`Assertion failed. Expected text: ${expectedText}.`);
19
19
  let annotationMessage = `Assertion failed. Expected text: ${expectedText}.`;
20
20
  browser.testError = annotationMessage
21
21
  await amendToBrowserstack(annotationMessage, "error");
@@ -177,14 +177,23 @@ const commonconfig = {
177
177
  resultdetails.comments.push(`${test.title} - failed: ${localError}`);
178
178
  browser.testError = null; // clear it
179
179
  scriptresult = "FAILED"
180
+ passed = false; // Mark test as failed
181
+ result = 1; // Update the result status
182
+
180
183
  // throw err; // causes test to fail after execution
181
184
  }
182
185
  if (passed && !localError) {
183
186
  scriptresult = "PASSED"
184
187
  resultdetails.comments.push(`${test.title} - passed`);
185
188
  }
186
- else if (!passed || error) {
187
- console.error(`========= Failed or Error occured while executing the test: ${error.message}`);
189
+ else if (!passed){
190
+ scriptresult = "FAILED"
191
+ // if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
192
+ resultdetails.comments.push(`${test.title} - failed: ${error.message === undefined ? "Test failed" : error.message}`);
193
+
194
+ }
195
+ else if(error) {
196
+ console.error(`========= Failed or Error occured while executing the test: ${error.message === undefined ? "Test failed" : error.message}}`);
188
197
  scriptresult = "FAILED"
189
198
  // if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
190
199
  resultdetails.comments.push(`${test.title} - failed: ${error.message}`);
@@ -204,10 +213,6 @@ const commonconfig = {
204
213
  jwtScript.platform.toLowerCase(),
205
214
  scriptresult)
206
215
 
207
- if (localError) {
208
- console.error("Test Error after all steps done :", localError);
209
- throw new Error(`Test failed: ${localError}`);
210
- }
211
216
 
212
217
  },
213
218
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.25",
3
+ "version": "4.0.27",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",