File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -322,16 +322,15 @@ class Reporter {
322
322
323
323
const additionalData = { } ;
324
324
325
- if ( testAssertion . skipped ) {
326
- additionalData . status = TestStatus . SKIPPED ;
327
- if ( this . options . skippedIssue === false ) {
328
- additionalData . issue = { issueType : 'NOT_ISSUE' } ;
329
- }
325
+ const status = currentStep . status || ( testAssertion . skipped ? TestStatus . SKIPPED : ( actualError ? TestStatus . FAILED : TestStatus . PASSED ) ) ;
326
+
327
+ if ( testAssertion . skipped && this . options . skippedIssue === false ) {
328
+ additionalData . issue = { issueType : 'NOT_ISSUE' } ;
330
329
}
331
330
332
331
this . client
333
332
. finishTestItem ( stepObj . tempId , {
334
- status : currentStep . status || ( actualError ? TestStatus . FAILED : TestStatus . PASSED ) ,
333
+ status,
335
334
...additionalData ,
336
335
} )
337
336
. promise . catch ( errorHandler ) ;
@@ -408,9 +407,11 @@ class Reporter {
408
407
this . sendResponseLogs ( testObj . testId , testObj . response ) ;
409
408
}
410
409
410
+ const hasFailedAssertions = result . assertions && result . assertions . some ( assertion => assertion . error ) ;
411
+
411
412
this . client
412
413
. finishTestItem ( testObj . testId , {
413
- status : status || TestStatus . PASSED ,
414
+ status : status || ( hasFailedAssertions ? TestStatus . FAILED : TestStatus . PASSED ) ,
414
415
} )
415
416
. promise . catch ( errorHandler ) ;
416
417
}
You can’t perform that action at this time.
0 commit comments