gwen-interpreter / gwen

Core Gwen interpreter
https://gweninterpreter.org
Apache License 2.0
36 stars 8 forks source link

Dry run issue when passing parameter from one StepDef to another #24

Closed bjuric closed 8 years ago

bjuric commented 8 years ago

The following causes Gwen to recurse forever trying to resolve a StepDef parameter value when executed in --dry-run mode only.

@StepDef
Scenario: I select "<a>" from the options list 
    Given I click option "$<a>" 
     When I do something with "$<a>"

@StepDef
Scenario: I do something with "<a>" 

In this example, $<a> resolves to $<a> at runtime when doing a dry run check on the call to the second StepDef (the When step). It hence infinitely recurses.

bjuric commented 8 years ago

Solution is to bind it to a decorated value for dry run purposes, by mapping $<a> to $[param:a] instead.

bjuric commented 8 years ago

Fixed in gwen v1.3.0 and gwen-web v1.5.0