README
Cuke Step Definition Generator
Cuke Step Definition Generator
will help the user by generating the Cucumber Glue / Step Definition snippet for the selected statement.
It will come as very handy while working with Cucumber JS in VS Code.
Features
Provides a couple of commands:
CTRL+SHIFT+Q
shortcut to runs the Cuke step definition generator by default file path
will execute in the currently selected line
CTRL+ALT+Q
shortcut to runs the Cuke step definition generator by dynamic file path
will execute in the currently selected line
CTRL+ALT+C
shortcut to runs the Cuke step definition generator by copy to clipboard
will execute in the currently selected line
How To Use:
- Install
Cuke Step Definition Generator
extension
3 Types Of Step Definition Generator Available, Mentioned Below:
- [I] - Generate step definition by default file path provided in the settings.json
- [II] - Generate step definition by dynamically selecting the file from the workspace
- [III] - Generate step definition by copy to clipboard
- In the opened app root create (if absent) .vscode folder with settings.json file or just run
mkdir .vscode && touch .vscode/settings.json
- Add following key value in settings.json
"cuke_step_definition_file_path":"folderpath/filename.js"
- See below example snippet for settings.json setup
- Open any
.feature
file in vs code editor
- Select the step which needs to generate step definition
- To Trigger The Cuke Step Definition Generator Default Path follow instructions below
Settings Example:
{
"cuke_step_definition_file_path": "test/e2e/step_definitions/stepDefinition.js"
}
Below Are The 3 Different Ways To Trigger The Cuke Step Definition Generator Default Path:
- [a] Press
CTRL+SHIFT+Q
shortcut to proceed to Generate Step Definition: Default File Path
- [b] Or
Right-click
and select Generate Step Definition: Default File Path
from Command Palette
to proceed to generate step definition
- [c] Or press
CTRL+SHIFT+P
shortcut and select Generate Step Definition: Default File Path
from Quick Picker
to proceed to generate step definition
Below Are The 3 Different Ways To Trigger The Cuke Step Definition Generator Dynamic Path:
- [a] Press
CTRL+ALT+Q
shortcut to proceed to Generate Step Definition: Dynamic File Path
- [b] Or
Right-click
and select Generate Step Definition: Dynamic File Path
from Command Palette
to proceed to generate step definition
- [c] Or press
CTRL+SHIFT+P
shortcut and select Generate Step Definition: Dynamic File Path
from Quick Picker
to proceed to generate step definition
Below Are The 3 Different Ways To Trigger The Cuke Step Definition Generator Copy To Clipboard:
- [a] Press
CTRL+ALT+C
shortcut to proceed to Generate Step Definition: Copy To Clipboard
- [b] Or
Right-click
and select Generate Step Definition: Copy To Clipboard
from Command Palette
to proceed to generate step definition
- [c] Or press
CTRL+SHIFT+P
shortcut and select Generate Step Definition: Copy To Clipboard
from Quick Picker
to proceed to generate step definition
How To Generate Single Statement Selected:
Future Ideas:
- Check and ignore duplicate entry in the step definition
Release Notes:
Notes for the released versions
1.0.0:
Initial release
1.1.0
Updated a few details in README.md file
1.2.0
Updated extension logo, fixed left trim issue
1.3.0
Updated Gallery Banner color updated
1.4.0
Updated Gallery Banner color updated
1.5.0
Updated categories and keywords
2.1.0
Rollback of to 1.5.0
3.0.0
- Updated default file path functions
- Implemented dynamic file path to generate Cuke Step Definition. This will come as handy while maintain multiple step definition files
3.0.1
Patch for the typo on description and README files.
3.0.2
Patch corrected the README file.
3.1.0
- Implemented Copy To Clipboard to generate Cuke Step Definition
3.2.0
- Bug fixed for a known issue - While trying to Generate Step Definition for multiple lines selected, snippet alignment will collapse and show as a syntax error in the pointed editor
- Improved Quick picker file search & selection
3.3.0
- Bug fixed on step definition generation
3.3.1
- Patch - Added demo gifs and updated README
3.3.2
- Patch - GIF path changed and updated README
3.3.3
- Patch - GIF tag changed and updated README
3.3.4
- Patch - GIF tag changed and updated README
3.3.5
3.3.6
- Bug fixed on step definition generation
3.3.7
- 3.3.7 Bug fixed on step definition generation