[
https://jira.codehaus.org/browse/JBEHAVE-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282724#comment-282724
]
Mark Michaelis commented on JBEHAVE-624:
----------------------------------------
* The use case I currently have is to provide an API of steps other projects
can use. Having this I cannot make composite steps within the API as the step
definitions will get unusable.
* Actually I think it is too easy to forget about the rule and the problem is
that nothing breaks but the test reports to be fine.
* So either an Exception needs to be thrown that nested Composite steps are not
allowed or it must be supported. Otherwise you will get your tests green just
by using nested Composite steps ;-)
> Nested Composite Steps are not resolved
> ---------------------------------------
>
> Key: JBEHAVE-624
> URL: https://jira.codehaus.org/browse/JBEHAVE-624
> Project: JBehave
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.5.2
> Reporter: Mark Michaelis
>
> Having {{@Composite}} steps calling other {{@Composite}} steps does not seem
> to work at all:
> {code:java}
> @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");
> }
> {code}
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email