features/demo03.feature in macros4cuke-0.1.07 vs features/demo03.feature in macros4cuke-0.2.00
- old
+ new
@@ -6,17 +6,17 @@
Scenario: defining basic macro with multiple arguments
# The next step creates a macro(-step)double quotes.
# The steps to execute when the macro is used/invoked are listed in the multiline triple quotes arguments.
- # The macro argument is put between double(triple) curly braces {{...}} as required by the Mustache template library.
- Given I define the step "When I [enter my userid {{userid}} and password {{password}}]" to mean:
+ # The macro-step arguments are put between chevrons <...>.
+ Given I define the step "When I [enter my userid <userid> and password <password>]" to mean:
"""
Given I landed in the homepage
When I click "Sign in"
- And I fill in "Username" with "{{userid}}"
- And I fill in "Password" with "{{password}}"
+ And I fill in "Username" with "<userid>"
+ And I fill in "Password" with "<password>"
And I click "Submit"
"""
Scenario: Let's use the macro we created above
# Here the macro is invoked. Actual value for the argument is put between double quotes.
@@ -33,10 +33,10 @@
"""
Scenario: A macro invoking another macro (YES, it's possible!)
Given I define the step "When I [enter my credentials]" to mean:
"""
- {{! Notice that the next step is invoking the first macro above}}
+ # Notice that the next step is invoking the first macro above
When I [enter my userid "guest" and password "unguessable"]
"""
# Invoking our lastly-created macro
When I [enter my credentials]
\ No newline at end of file