Description
Currently, a scenario must start with Given. In real Gherkin scenarios, you can start with any keyword (Given, When, or Then), but the current DSL forces you to always use Given first:
// Current: Must start with Given
Bdd(feature)
.scenario('Login')
.given('user is registered')
.when('user logs in')
.then('access granted');
Trying to start with When or Then directly causes a compile error.
Proposed API
// Should allow starting with any keyword
Bdd(feature)
.scenario('Login')
.when('user logs in')
.then('access granted');
Bdd(feature)
.scenario('Test')
.then('result happens');
Expected Behavior
Just like in Gherkin/Cucumber, a scenario should be able to start with any step keyword, not just Given.
Description
Currently, a scenario must start with
Given. In real Gherkin scenarios, you can start with any keyword (Given,When, orThen), but the current DSL forces you to always useGivenfirst:Trying to start with
WhenorThendirectly causes a compile error.Proposed API
Expected Behavior
Just like in Gherkin/Cucumber, a scenario should be able to start with any step keyword, not just
Given.