| 1 |
@issue |
| 2 |
Feature: Issue #35 Plain Formatter shows wrong steps when tag-selection is used |
| 3 |
|
| 4 |
Background: Test Setup |
| 5 |
Given a new working directory |
| 6 |
And a file named "features/steps/steps.py" with: |
| 7 |
""" |
| 8 |
from behave import given, when, then |
| 9 |
|
| 10 |
@given(u'the ninja has a third level black-belt') |
| 11 |
def step(context): |
| 12 |
pass |
| 13 |
|
| 14 |
@when(u'attacked by {opponent}') |
| 15 |
def step(context, opponent): |
| 16 |
pass |
| 17 |
|
| 18 |
@then(u'the ninja should {reaction}') |
| 19 |
def step(context, reaction): |
| 20 |
pass |
| 21 |
""" |
| 22 |
And a file named "features/issue35_1.feature" with: |
| 23 |
""" |
| 24 |
Feature: Using Tags with Features and Scenarios |
| 25 |
|
| 26 |
@one |
| 27 |
Scenario: Weaker opponent |
| 28 |
Given the ninja has a third level black-belt |
| 29 |
When attacked by a samurai |
| 30 |
Then the ninja should engage the opponent |
| 31 |
|
| 32 |
@two |
| 33 |
Scenario: Stronger opponent |
| 34 |
Given the ninja has a third level black-belt |
| 35 |
When attacked by Chuck Norris |
| 36 |
Then the ninja should run for his life |
| 37 |
""" |
| 38 |
|
| 39 |
Scenario: Select First Scenario with Tag |
| 40 |
When I run "behave --no-timings -f plain --tags=@one features/issue35_1.feature" |
| 41 |
Then it should pass with: |
| 42 |
""" |
| 43 |
1 feature passed, 0 failed, 0 skipped |
| 44 |
1 scenario passed, 0 failed, 1 skipped |
| 45 |
3 steps passed, 0 failed, 3 skipped, 0 undefined |
| 46 |
""" |
| 47 |
And the command output should contain: |
| 48 |
""" |
| 49 |
Feature: Using Tags with Features and Scenarios |
| 50 |
Scenario: Weaker opponent |
| 51 |
Given the ninja has a third level black-belt ... passed |
| 52 |
When attacked by a samurai ... passed |
| 53 |
Then the ninja should engage the opponent ... passed |
| 54 |
Scenario: Stronger opponent |
| 55 |
""" |
| 56 |
|
| 57 |
Scenario: Select Second Scenario with Tag |
| 58 |
When I run "behave --no-timings -f plain --tags=@two features/issue35_1.feature" |
| 59 |
Then it should pass with: |
| 60 |
""" |
| 61 |
1 feature passed, 0 failed, 0 skipped |
| 62 |
1 scenario passed, 0 failed, 1 skipped |
| 63 |
3 steps passed, 0 failed, 3 skipped, 0 undefined |
| 64 |
""" |
| 65 |
And the command output should contain: |
| 66 |
""" |
| 67 |
Feature: Using Tags with Features and Scenarios |
| 68 |
Scenario: Weaker opponent |
| 69 |
Scenario: Stronger opponent |
| 70 |
Given the ninja has a third level black-belt ... passed |
| 71 |
When attacked by Chuck Norris ... passed |
| 72 |
Then the ninja should run for his life ... passed |
| 73 |
""" |
| 74 |
|