Skip to content

Commit b8b3c79

Browse files
fixed Feature that contains only undefined/skipped scenarios is displayed as passed (#37)
1 parent d83ec9e commit b8b3c79

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

CHANGELOG.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.14.4
2+
- fixed [Feature that contains only undefined/skipped scenarios is displayed as passed](https://github.com/qavajs/html-formatter/issues/36)
3+
14
# 0.14.3
25
- fixed width and height of error and logs overlay
36

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qavajs/html-formatter",
3-
"version": "0.14.3",
3+
"version": "0.14.4",
44
"main": "formatter/formatter.js",
55
"scripts": {
66
"report:compile": "node test/compile_report.js",

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const data = window.sourceData
3333
total: feature.elements.length,
3434
elements: feature.elements.map((scenario: any) => ({
3535
...scenario,
36-
isFailed: scenario.steps.some((step: any) => step.result.status === 'failed')
36+
isFailed: scenario.steps.some((step: any) => step.result.status !== 'passed')
3737
})),
3838
}))
3939
.map((feature: any) => ({

test-e2e/features/FeaturePage.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Feature: Feature Page
1212

1313
Scenario: verify that user can filter only failed on feature page
1414
When I click 'Feature > Show Only Failed'
15-
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '3'
15+
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '6'
1616
And I expect text of 'Feature > #1 of Scenarios > Title' to be equal 'Scenario: scenario failed'
1717

1818
Scenario: verify that filter state is saved
1919
When I click 'Feature > Show Only Failed'
20-
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '3'
20+
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '6'
2121
And I expect text of 'Feature > #1 of Scenarios > Title' to be equal 'Scenario: scenario failed'
2222
When I refresh page
23-
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '3'
23+
Then I expect number of elements in 'Feature > Scenarios' collection to be equal '6'
2424
And I expect text of 'Feature > #1 of Scenarios > Title' to be equal 'Scenario: scenario failed'

0 commit comments

Comments
 (0)