froth-webdriverio-framework 4.0.36 → 4.0.37
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.
|
@@ -142,9 +142,7 @@ const commonconfig = {
|
|
|
142
142
|
|
|
143
143
|
console.log('==== BEFORE TEST HOOK ====');
|
|
144
144
|
console.log(`====> Test Started '${test.title}'`);
|
|
145
|
-
|
|
146
|
-
// console.log("File Name:", test.file);
|
|
147
|
-
|
|
145
|
+
|
|
148
146
|
},
|
|
149
147
|
|
|
150
148
|
|
|
@@ -171,21 +169,7 @@ const commonconfig = {
|
|
|
171
169
|
let scriptresult = "NOT RUN";
|
|
172
170
|
// Default assumption: test passed (unless soft assertion failed)
|
|
173
171
|
let finalPassed = passed;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
// Check soft assertion failures
|
|
177
|
-
// const softErrors = browser.testErrors || [];
|
|
178
|
-
// if (softErrors.length > 0) {
|
|
179
|
-
// finalPassed = false; // Override status
|
|
180
|
-
// const softErrorMessage = `Soft assertion errors: ${softErrors.join('<br>')}`;
|
|
181
|
-
// console.log('====> Soft Assertion Failures Detected:\n' + softErrorMessage);
|
|
182
|
-
|
|
183
|
-
// // Log in resultdetails
|
|
184
|
-
// resultdetails.comments.push(`${test.title} - failed: ${softErrorMessage}`);
|
|
185
|
-
// global.__SOFT_FAIL__ = true;
|
|
186
|
-
// // Overwrite the error param so your logic can pick it up
|
|
187
|
-
// combinedError = new Error(softErrorMessage);
|
|
188
|
-
// }
|
|
172
|
+
|
|
189
173
|
if (passed) {
|
|
190
174
|
scriptresult = "PASSED"
|
|
191
175
|
resultdetails.comments.push(`${test.title} - passed`);
|
|
@@ -211,10 +195,7 @@ const commonconfig = {
|
|
|
211
195
|
jwtScript.scriptId,
|
|
212
196
|
jwtScript.platform.toLowerCase(),
|
|
213
197
|
scriptresult)
|
|
214
|
-
|
|
215
|
-
// if (softErrors.length > 0) {
|
|
216
|
-
// throw combinedError; // 👈 this is what forces the test to fail in WDIO
|
|
217
|
-
// }
|
|
198
|
+
|
|
218
199
|
|
|
219
200
|
},
|
|
220
201
|
/**
|
|
@@ -303,10 +284,7 @@ const commonconfig = {
|
|
|
303
284
|
console.log('Execution Time:', results.duration);
|
|
304
285
|
console.log('Exit Code:', exitCode);
|
|
305
286
|
console.log('==== ALL TESTS ARE COMPLETED ====');
|
|
306
|
-
|
|
307
|
-
// console.log('❌ One or more tests failed due to soft assertion.');
|
|
308
|
-
// process.exit(1); // ✅ Force failure
|
|
309
|
-
// }
|
|
287
|
+
|
|
310
288
|
|
|
311
289
|
return exitCode;
|
|
312
290
|
}
|