froth-webdriverio-framework 4.0.18 → 4.0.20

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.
@@ -147,19 +147,19 @@ const commonconfig = {
147
147
  resultdetails.comments.push(`${test.title} - failed: ${localError}`);
148
148
  browser.testError = null; // clear it
149
149
  scriptresult = "FAILED"
150
- // throw err; // causes test to fail after execution
150
+ // throw err; // causes test to fail after execution
151
151
  }
152
- if (passed && !localError ) {
152
+ if (passed && !localError) {
153
153
  scriptresult = "PASSED"
154
154
  resultdetails.comments.push(`${test.title} - passed`);
155
155
  }
156
- else if (!passed && error) {
156
+ else if (!passed || error) {
157
157
  console.error(`========= Failed or Error occured while executing the test: ${error.message}`);
158
158
  scriptresult = "FAILED"
159
- // if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
160
- resultdetails.comments.push(`${test.title} - failed: ${error.message}`);
159
+ // if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
160
+ resultdetails.comments.push(`${test.title} - failed: ${error.message}`);
161
161
  }
162
-
162
+
163
163
  let scriptDetails = BUFFER.getItem("FROTHE_SUITE_DETAILS");
164
164
  if (typeof scriptDetails === "string") {
165
165
  scriptDetails = JSON.parse(scriptDetails);
@@ -174,6 +174,9 @@ const commonconfig = {
174
174
  jwtScript.platform.toLowerCase(),
175
175
  scriptresult)
176
176
 
177
+ if (localError)
178
+ throw localError;
179
+
177
180
  },
178
181
  /**
179
182
  * Hook that gets executed after the suite has ended (in Mocha/Jasmine only).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.18",
3
+ "version": "4.0.20",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",