forked from Klaveness-Digital/cypress-cucumber-preprocessor
-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: step definitions related to the feature file (#121) * docs: added information about smart tagging
- Loading branch information
Showing
6 changed files
with
112 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Feature: Smart Tagging | ||
|
||
As a cucumber cypress plugin which handles Tags | ||
I want to allow people to select tests to run if focused | ||
So they can work more efficiently and have a shorter feedback loop | ||
|
||
Scenario: This scenario should not run if @focus is on another scenario | ||
Then this unfocused scenario should not run | ||
|
||
@focus | ||
Scenario: This scenario is focused and should run | ||
Then this focused scenario should run | ||
|
||
@this-tag-affects-nothing | ||
Scenario: This scenario should also not run | ||
Then this unfocused scenario should not run | ||
|
||
@focus | ||
Scenario: This scenario is also focused and also should run | ||
Then this focused scenario should run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const assert = require("assert"); | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
const { Then } = require("cypress-cucumber-preprocessor/steps"); | ||
|
||
Then(`this focused scenario should run`, () => { | ||
assert(true); | ||
}); | ||
|
||
Then(`this unfocused scenario should not run`, () => { | ||
assert(false); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters