Sha256: 080ac200866b9901b31bdb6cd1a5e54e827579505c0f56b94e3d3e3feff31796

Contents?: true

Size: 1.33 KB

Versions: 13

Compression:

Stored size: 1.33 KB

Contents

# File: demo04.feature

Feature: Show the use of a macro with multiple arguments in a table
  As a Cuke user
  So that I enjoy writing scenario.


Scenario: Defining a macro to be used with multiple arguments in a table
  # The next step creates a macro(-step)
  # The syntax of the new macro-step is specified between double quotes.
  # The steps to execute when the macro is used/invoked are listed in the multiline triple quotes arguments.
  # The macro arguments are put between chevrons <...>.
  Given I define the step "* I [enter my credentials as]:" 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 click "Submit"
  """

Scenario: Let's use the macro we created above
  # Here the macro is invoked. Actual value for the argument are passed in a table argument.
  When I [enter my credentials as]:
  |userid|guest|
  |password|unguessable|

  # 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

13 entries across 13 versions & 1 rubygems

Version Path
macros4cuke-0.4.07 features/demo04.feature
macros4cuke-0.4.06 features/demo04.feature
macros4cuke-0.4.05 features/demo04.feature
macros4cuke-0.4.04 features/demo04.feature
macros4cuke-0.4.03 features/demo04.feature
macros4cuke-0.4.02 features/demo04.feature
macros4cuke-0.4.01 features/demo04.feature
macros4cuke-0.4.00 features/demo04.feature
macros4cuke-0.3.42 features/demo04.feature
macros4cuke-0.3.41 features/demo04.feature
macros4cuke-0.3.40 features/demo04.feature
macros4cuke-0.3.39 features/demo04.feature
macros4cuke-0.3.38 features/demo04.feature