Sha256: 148bf903810b4ec4a6343e71252b2afa0d455a185ab41e38c88bd5070075fb7d

Contents?: true

Size: 1.18 KB

Versions: 15

Compression:

Stored size: 1.18 KB

Contents

# File: demo01.feature

Feature: Define and use a basic macro-step
  As a Cuke user
  I want to create macro-steps that replace repeating lower-level steps
  So that I can write shorter and more readable scenarios.


Scenario: Defining a simple macro-step
  # 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.
  Given I define the step "* I [log in]" to mean:
  """
  # Here follows the steps to execute when this macro is called
  Given I landed in the homepage
  When I click "Sign in"
  And I fill in "Username" with "johndoe"
  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
  When I [log in]

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
macros4cuke-0.5.18 features/1_the_basics/demo01.feature
macros4cuke-0.5.17 features/1_the_basics/demo01.feature
macros4cuke-0.5.16 features/1_the_basics/demo01.feature
macros4cuke-0.5.15 features/1_the_basics/demo01.feature
macros4cuke-0.5.14 features/1_the_basics/demo01.feature
macros4cuke-0.5.13 features/1_the_basics/demo01.feature
macros4cuke-0.5.12 features/1_the_basics/demo01.feature
macros4cuke-0.5.11 features/1_the_basics/demo01.feature
macros4cuke-0.5.10 features/1_the_basics/demo01.feature
macros4cuke-0.5.09 features/1_the_basics/demo01.feature
macros4cuke-0.5.08 features/1_the_basics/demo01.feature
macros4cuke-0.5.07 features/1_the_basics/demo01.feature
macros4cuke-0.5.06 features/1_the_basics/demo01.feature
macros4cuke-0.5.03 features/1_the_basics/demo01.feature
macros4cuke-0.4.09 features/1_the_basics/demo01.feature