-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbehatcli_steps.feature
61 lines (57 loc) · 1.6 KB
/
behatcli_steps.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@behatcli
Feature: Behat CLI context additional steps
@trait:PathTrait
Scenario: Test fails with exception
Given some behat configuration
And scenario steps:
"""
Given I go to the homepage
Then I throw test exception with message "Intentional error"
And I should be in the "nonexisting" path
"""
When I run "behat --no-colors"
Then it should fail with an exception:
"""
Intentional error
"""
@trait:PathTrait
Scenario: Test with additionally tagged scenario fails with exception
Given some behat configuration
And scenario steps tagged with "@tag1 @tag2":
"""
Given I go to the homepage
Then I throw test exception with message "Intentional error"
And I should be in the "nonexisting" path
"""
When I run "behat --no-colors"
Then it should fail with an exception:
"""
Intentional error
"""
And the output should contain:
"""
@tag1 @tag2
"""
@trait:PathTrait
Scenario: Test fails
Given some behat configuration
And scenario steps:
"""
Given I go to the homepage
And I should be in the "nonexisting" path
"""
When I run "behat --no-colors"
Then it should fail
@trait:PathTrait
Scenario: Test fails with message
Given some behat configuration
And scenario steps:
"""
Given I go to the homepage
And I should be in the "nonexisting" path
"""
When I run "behat --no-colors"
Then it should fail with an error:
"""
Current path is "<front>", but expected is "nonexisting"
"""