jest-cucumber icon indicating copy to clipboard operation
jest-cucumber copied to clipboard

Extended "Rule" keyword support

Open makmu opened this issue 4 years ago • 1 comments

Hi. In our project we have 1k+ scenarios and thus rely heavily on the "Rule" keyword to group our scenarios within feature files. Currently, jest-cucumber squashes all scenarios of all rules within a feature into a flat list. This way it is not possible to have scenarios with the same title in different rule sections of one feature. Furthermore, since rules provide additional information, it would be nice if each rule and its scenarios were mapped to a separate "describe" section in jest. This way you could even see the rules in the jest output :)

makmu avatar Mar 18 '21 16:03 makmu

I've created #121 which adds this behavior to the library. In order to not introduce any breaking changes, I added a new option collapseRules which is true by default. If set to false you can use defineRuleBasedFeature() or autoBindStepsWithRules() to implement scenario steps and have each rule section mapped to different describe sections in jest.

It would be really nice if you could have a look at it and consider it for merging :)

makmu avatar Mar 18 '21 16:03 makmu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 07 '24 02:04 github-actions[bot]

This issue is closed because there has been no recent activity.

github-actions[bot] avatar Apr 14 '24 03:04 github-actions[bot]