-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
profiles.feature
97 lines (83 loc) · 2.23 KB
/
profiles.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Feature: default command line arguments
In order to prevent users from having to enter the options they use every time
Users can define cucumber.js with profiles which are groups of command line arguments.
Background:
Given a file named "features/a.feature" with:
"""
Feature: some feature
Scenario: some scenario
Given a passing step
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('@cucumber/cucumber')
Given(/^a passing step$/, function() {})
"""
And a file named "cucumber.js" with:
"""
module.exports = {
'default': '--format summary',
dry: '--dry-run',
progress: '--format progress'
};
"""
Scenario: default profile
When I run cucumber-js
Then it outputs the text:
"""
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""
Scenario Outline: specifying a profile
When I run cucumber-js with `<OPT> progress`
Then it outputs the text:
"""
.
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""
Examples:
| OPT |
| -p |
| --profile |
Scenario: specifying multiple profiles
When I run cucumber-js with `-p dry -p progress`
Then it outputs the text:
"""
-
1 scenario (1 skipped)
1 step (1 skipped)
<duration-stat>
"""
Scenario: overriding the default profile
When I run cucumber-js with `-f summary`
Then it outputs the text:
"""
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""
Scenario Outline: specifying a configuration file
Given a file named ".cucumber-rc.js" with:
"""
module.exports = {
'default': '--dry-run'
};
"""
When I run cucumber-js with `<OPT> .cucumber-rc.js`
Then it outputs the text:
"""
-
1 scenario (1 skipped)
1 step (1 skipped)
<duration-stat>
"""
Examples:
| OPT |
| -c |
| --config |
Scenario: specifying a configuration file that doesn't exist
When I run cucumber-js with `--config doesntexist.js`
Then it fails