vscode-cucumber
vscode-cucumber copied to clipboard
Additional Snippets
Add snippets for And and But steps
@stevejpurves Can you give an example of how a snippet for And and But would work?
Do you mean in a spec or implementation?
In a spec I think And/But are interchangable, and just down to readability. Both do that same job of avoiding repetition of the previous primary keyword Given/When/Then.
The Gherkin spec shows them as indented to another level , but I've not done that in practice myself. Others may have that preference. So basically it is transforming
Scenario: Some determinable business situation
Given some precondition
Given some other precondition
When some action by the actor
When some other action
When yet another action
Then some testable outcome is achieved
Then something else we can check happens too
Scenario: Some determinable business situation
Given some precondition
But some other precondition
When some action by the actor
And some other action
And yet another action
Then some testable outcome is achieved
But something else we can check happens too
Implementation wise there is some additional indenting but otherwise it is just the same behaviour as the Given/When/Thens
prefixes and and but would work?
@dialex, i've created code snippets for syntax in the pt-br language, can I contribute?
@gabrielsimas I think we already have the code snippets for pt-br. Check https://github.com/euclidity/vscode-cucumber/issues/14#issuecomment-372035141. The tricky part is developing a mechanism that allows multiple languages in the same extension. Pull Requests are welcomed ;)