Skip to content

Commit

Permalink
Handle UNKNOWN status when rendering test run outcome (#2441)
Browse files Browse the repository at this point in the history
* added unknown status for summary message

* spec total count updated

* match order from messages

* changelog and attribution

---------

Co-authored-by: David Goss <david@davidgoss.co>
  • Loading branch information
hynding and davidjgoss authored Nov 16, 2024
1 parent 1c4d9c5 commit ee538bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber
### Changed
- Replace JUnit formatter with messages-based package ([#2445](https://github.com/cucumber/cucumber-js/pull/2445))

### Fixed
- Handle UNKNOWN status when rendering test run outcome ([#2441](https://github.com/cucumber/cucumber-js/pull/2441))

## [11.0.1] - 2024-09-14
### Fixed
- Add missing setParallelCanAssign export ([#2427](https://github.com/cucumber/cucumber-js/pull/2427))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"Simon Lampen <simonlampen@vinsight.net>",
"Sonny Piers <sonny@fastmail.net>",
"Stanley Shyiko <stanley.shyiko@gmail.com>",
"Steve Hynding (https://github.com/hynding)",
"Steve Tooke <tooky@cucumber.io>",
"szymonprz <szymonprz@gmail.com>",
"Ted de Koning",
Expand Down
1 change: 1 addition & 0 deletions src/formatter/helpers/summary_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const STATUS_REPORT_ORDER = [
messages.TestStepResultStatus.PENDING,
messages.TestStepResultStatus.SKIPPED,
messages.TestStepResultStatus.PASSED,
messages.TestStepResultStatus.UNKNOWN,
]

export interface IFormatSummaryRequest {
Expand Down
4 changes: 3 additions & 1 deletion src/formatter/helpers/summary_helpers_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,16 @@ describe('SummaryHelpers', () => {
' Given a skipped step',
' Scenario: a6',
' Given an undefined step',
// an unknown scenario
' Scenario:',
].join('\n')

// Act
const output = await testFormatSummary({ sourceData })

// Assert
expect(output).to.contain(
'6 scenarios (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed)\n' +
'7 scenarios (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed, 1 unknown)\n' +
'6 steps (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed)\n' +
'0m00.000s (executing steps: 0m00.000s)\n'
)
Expand Down

0 comments on commit ee538bd

Please sign in to comment.