Debian Codegraph @

issue.features/issue0114.feature

raw
1 @issue
2 @change_request
3 Feature: Issue #114: Avoid unnecessary blank lines w/ --no-skipped option
4
5 . Unnessary blank lines appear when you use (for each skipped feature):
6 .
7 . behave -f progress --tags=@one --no-skipped ...
8
9 @setup
10 Scenario: Feature Setup
11 Given a new working directory
12 And a file named "features/steps/passing_steps.py" with:
13 """
14 from behave import step
15
16 @step(u'a step passes')
17 def step_passes(context):
18 pass
19 """
20 And a file named "features/e1.feature" with:
21 """
22 @example
23 Feature: E1
24 Scenario: S1.1
25 Given a step passes
26 """
27 And a file named "features/e2.feature" with:
28 """
29 @exclude
30 Feature: E2
31 Scenario: S2.1
32 Given a step passes
33 """
34 And a file named "features/e3.feature" with:
35 """
36 @example
37 Feature: E3
38 Scenario: S3.1
39 Given a step passes
40 """
41
42 Scenario: Run Features with tags and --show-skipped option
43 When I run "behave -f progress --tags=@example"
44 Then it should pass with:
45 """
46 2 features passed, 0 failed, 1 skipped
47 2 scenarios passed, 0 failed, 1 skipped
48 2 steps passed, 0 failed, 1 skipped, 0 undefined
49 """
50 And the command output should contain:
51 """
52 features/e1.feature .
53 features/e2.feature S
54 features/e3.feature .
55 """
56
57 Scenario: Run Features with tag and --no-skipped option (CASE 1)
58 When I run "behave -f progress --tags=@example --no-skipped"
59 Then it should pass with:
60 """
61 2 features passed, 0 failed, 1 skipped
62 2 scenarios passed, 0 failed, 1 skipped
63 2 steps passed, 0 failed, 1 skipped, 0 undefined
64 """
65 And the command output should contain exactly:
66 """
67 features/e1.feature .
68 features/e3.feature .
69 """
70 But the command output should not contain exactly:
71 """
72 features/e1.feature .
73
74 features/e3.feature .
75 """
76
77 Scenario: Run Features with other tag and --no-skipped option (CASE 2)
78 When I run "behave -f progress --tags=@exclude --no-skipped"
79 Then it should pass with:
80 """
81 1 feature passed, 0 failed, 2 skipped
82 1 scenario passed, 0 failed, 2 skipped
83 1 step passed, 0 failed, 2 skipped, 0 undefined
84 """
85 And the command output should contain exactly:
86 """
87 features/e2.feature .
88 """
89
90 Scenario: Run Features with tag, --no-skipped and plain formatter (CASE 3)
91 When I run "behave -f plain --tags=@example --no-skipped -T"
92 Then it should pass with:
93 """
94 2 features passed, 0 failed, 1 skipped
95 2 scenarios passed, 0 failed, 1 skipped
96 2 steps passed, 0 failed, 1 skipped, 0 undefined
97 """
98 And the command output should contain exactly:
99 """
100 Feature: E1
101
102 Scenario: S1.1
103 Given a step passes ... passed
104
105 Feature: E3
106
107 """
108 But the command output should not contain exactly:
109 """
110 Feature: E1
111
112 Scenario: S1.1
113 Given a step passes ... passed
114
115
116 Feature: E3
117
118 """