Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asterisks as continuation steps on par with And and But #617

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Artalus
Copy link

@Artalus Artalus commented Apr 29, 2023

Gherkin Documentation mentions you can uses * (asterisk) to describe lists of things, same way as with And steps:

Scenario: All done
  Given I am out shopping
  * I have eggs
  * I have milk
  * I have butter
  When I check my list
  Then I don't need anything

Dunno if anybody actually needs such feature - since search for asterisk did not yield anything neither in PRs nor Issues. But since the change is literally 1 line of code, I thought I might propose it just as well and see what happens 馃槃
Not sure if the place for testing it is right (tests/feature/test_steps.py) or if it should be done someplace else tho.


One (perhaps controversial) use-case that comes to mind, which would benefit from asterisks, is something like this:

Given foo '1' is barred
And   foo '2' is barred

When Alice bazzes foo '2'

Then we observe foo '1':
* its 'top' is 'kek'
* ...

Then we observe foo '2':
* its 'top' is 'peck'
* ...

It could be written as Then we observe ... and its ... already, and would definitely be better with something like For foo ... its ... - but I think asterisks might still be a step in right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant