Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Additional Snippets #8

Open
stevejpurves opened this issue Jul 31, 2016 · 4 comments
Open

Additional Snippets #8

stevejpurves opened this issue Jul 31, 2016 · 4 comments
Milestone

Comments

@stevejpurves
Copy link
Collaborator

Add snippets for And and But steps

@dialex
Copy link
Collaborator

dialex commented Feb 28, 2018

@stevejpurves Can you give an example of how a snippet for And and But would work?

@stevejpurves
Copy link
Collaborator Author

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 dialex added triaged and removed needs-info labels Mar 7, 2018
@dialex dialex added this to the 1.0 milestone Mar 10, 2018
@gabrielsimas
Copy link

gabrielsimas commented Apr 19, 2019

@dialex, i've created code snippets for syntax in the pt-br language, can I contribute?

@dialex
Copy link
Collaborator

dialex commented Apr 27, 2019

@gabrielsimas I think we already have the code snippets for pt-br. Check #14 (comment). The tricky part is developing a mechanism that allows multiple languages in the same extension.
Pull Requests are welcomed ;)

@dialex dialex removed the triaged label Sep 5, 2019
brice added a commit to brice/vscode-cucumber that referenced this issue Sep 19, 2022
Related to euclidity#8, adding snipped for "and" and "but"
brice added a commit to brice/vscode-cucumber that referenced this issue Sep 19, 2022
 Fix typo in giv snippets and add an and bu snippets, related to euclidity#8 issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants