Details
-
Type: New Feature
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Number of attachments :
Description
Consider:
Given something And something else Then it happened or.. Given something Then it happened and.. @When("something") public void something() { } @When("something else") public void somethingElse() { } @Then("it happened") public void itHappened() { }
I'd like to be able to know in something() whether the next step is of a different type or not.
@When("something") public void something(@Named("lastOfStepType") boolean lastOfStepType) { }
This is particularly useful for UI interactions (WebDriver etc).
Given I am have a hat in the cart
When I purchase with credit card
And I specify an alternate delivery address
Then I should see a warning about different addresses
I might want...
When I purchase with credit card
... as a standalone, or with refining AND clauses. In the last of the when lines that's pertinent I may execute the whole set. When in this context feels like a continuation of sorts.