Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty Print when using rules (#440) #480

Merged
merged 4 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added test with rule and scenario outline (#440)
  • Loading branch information
dumpsterfireproject committed Jun 10, 2022
commit c639f6a00b881ecf7c25408b909fa9288eb1cf3e
44 changes: 44 additions & 0 deletions features/formatter/pretty.feature
Original file line number Diff line number Diff line change
Expand Up @@ -504,3 +504,47 @@ Feature: pretty formatter
2 steps (2 passed)
0s
"""

Scenario: Support of Feature Plus Rule with Scenario Outline
Given a feature "features/simple.feature" file:
"""
Feature: simple feature with a rule with Scenario Outline
simple feature description
Rule: simple rule
simple rule description
Scenario Outline: simple scenario
simple scenario description

Given <status> step

Examples: simple examples
| status |
| passing |
| failing |
"""
When I run feature suite with formatter "pretty"
Then the rendered output will be as follows:
"""
Feature: simple feature with a rule with Scenario Outline
simple feature description

Scenario Outline: simple scenario # features/simple.feature:5
Given <status> step # suite_context.go:0 -> SuiteContext.func2

Examples: simple examples
| status |
| passing |
| failing |
intentional failure

--- Failed steps:

Scenario Outline: simple scenario # features/simple.feature:5
Given failing step # features/simple.feature:8
Error: intentional failure


2 scenarios (1 passed, 1 failed)
2 steps (1 passed, 1 failed)
0s
"""
12 changes: 6 additions & 6 deletions run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ func Test_AllFeaturesRun(t *testing.T) {
...................................................................... 140
...................................................................... 210
...................................................................... 280
.............................................. 326
................................................. 329


85 scenarios (85 passed)
326 steps (326 passed)
86 scenarios (86 passed)
329 steps (329 passed)
0s
`

Expand All @@ -459,11 +459,11 @@ func Test_AllFeaturesRunAsSubtests(t *testing.T) {
...................................................................... 140
...................................................................... 210
...................................................................... 280
.............................................. 326
................................................. 329


85 scenarios (85 passed)
326 steps (326 passed)
86 scenarios (86 passed)
329 steps (329 passed)
0s
`

Expand Down