Sha256: 6822161eb9b6df3b34d373e1dbceffa26913c122a90ead47012fdedc6c1b8058

Contents?: true

Size: 1.23 KB

Versions: 22

Compression:

Stored size: 1.23 KB

Contents

# File: demo02.feature

Feature: Show the use of a basic macro with one argument
  As a Cuke user
  So that I enjoy writing scenario.


Scenario: Creating a basic scenario with one argument
  # The next step creates a macro(-step)
  # The syntax of the new macro-step is specified between the 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 chevrons <...>.
  Given I define the step "When I [log in\[\] as <userid>]" 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 "unguessable"
  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.
  When I [log in\[\] as "guest"]

  # The next step verifies that the steps from the macro were effectively executed.
  Then I expect the following step trace:
  """
Invoked step: ... I landed in the homepage
Invoked step: ... I click "Sign in"
Invoked step: ... I fill in "Username" with "guest"
Invoked step: ... I fill in "Password" with "unguessable"
Invoked step: ... I click "Submit"
  """

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
macros4cuke-0.3.00 features/demo02.feature
macros4cuke-0.2.22 features/demo02.feature
macros4cuke-0.2.21 features/demo02.feature
macros4cuke-0.2.20 features/demo02.feature
macros4cuke-0.2.19 features/demo02.feature
macros4cuke-0.2.18 features/demo02.feature
macros4cuke-0.2.17 features/demo02.feature
macros4cuke-0.2.16 features/demo02.feature
macros4cuke-0.2.15 features/demo02.feature
macros4cuke-0.2.14 features/demo02.feature
macros4cuke-0.2.13 features/demo02.feature
macros4cuke-0.2.12 features/demo02.feature
macros4cuke-0.2.11 features/demo02.feature
macros4cuke-0.2.10 features/demo02.feature
macros4cuke-0.2.09 features/demo02.feature
macros4cuke-0.2.08 features/demo02.feature
macros4cuke-0.2.07 features/demo02.feature
macros4cuke-0.2.06 features/demo02.feature
macros4cuke-0.2.05 features/demo02.feature
macros4cuke-0.2.04 features/demo02.feature