Details
Description
Having @Composite steps calling other @Composite steps does not seem to work at all:
@Then("all buttons are enabled") @Composite(steps = { "Then all left buttons are enabled", "Then all top buttons are enabled" } ) public void all() {} @Then("all left buttons are enabled") @Composite(steps = { "Then first left button is enabled", "Then second left button is enabled" } ) public void left() {} @Then("all top buttons are enabled") @Composite(steps = { "Then first top button is enabled", "Then second top button is enabled" } ) public void top() {} @Then("first top button is enabled") public void firstTop() { Assert.fail("Bah"); }
In the given scenario neither the substeps will be resolved nor called. So Then second top button is enabled will not be marked as pending and Then first top button is enabled won't fail.
That's not nice as it might break your steps if you do some refactorings to them. Composite-calls should not need know if they again resolve to Composite steps.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Summary | Nested Composite Steps are not resolved | Support nested composite steps |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | 3.5.3 [ 18047 ] | |
Fix Version/s | 3.6 [ 17721 ] |
Mauro Talevi
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Mauro Talevi
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
The nested composite steps use case was never considered when the feature was introduced.
It deserves a discussion on its merits, but it's not a bug as such.