splendo / CucumberMultiplatform

Apache License 2.0
2 stars 0 forks source link

Add "And" Definition implementation #17

Closed corrado4eyes closed 10 months ago

corrado4eyes commented 1 year ago

In Gherkin syntax "And" will help the developer to not repeat the next step if it matches the previous one in the declaration. E.g

Given The accessibility settings are enabled
Given The user has set "Protanopia" as color blindness
Then  The background color should not be "red"
Then  The background color should not be "green"

Can be written using the "And" keyword to make it easier to read and not repetitive:

Given The accessibility settings are enabled
And The user has set "Protanopia" as color blindness
Then  The background color should not be "red"
And  The background color should not be "green"
ChristoferAlexander commented 10 months ago

And works out of the box if replaced in the feature file. Not sure why but probably the SDK turns them to Given and Then