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


Reply via email to