-
Notifications
You must be signed in to change notification settings - Fork 403
/
step_definitions.feature
48 lines (44 loc) · 1.49 KB
/
step_definitions.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
Feature: step definitions
Rule: it should by default look for step definitions in a couple of locations
Example: step definitions with same filename
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: a scenario name
Given a step
"""
And a file named "cypress/e2e/a.js" with:
"""
const { Given } = require("@klaveness/cypress-cucumber-preprocessor");
Given("a step", function() {});
"""
When I run cypress
Then it passes
Example: step definitions in a directory with same name
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: a scenario name
Given a step
"""
And a file named "cypress/e2e/a/steps.js" with:
"""
const { Given } = require("@klaveness/cypress-cucumber-preprocessor");
Given("a step", function() {});
"""
When I run cypress
Then it passes
Example: step definitions in a common directory
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: a scenario name
Given a step
"""
And a file named "cypress/support/step_definitions/steps.js" with:
"""
const { Given } = require("@klaveness/cypress-cucumber-preprocessor");
Given("a step", function() {});
"""
When I run cypress
Then it passes