Feature: Login

To ensure the safety of the application
A regular user of the system
Must authenticate before using the app

Scenario Outline: Failed Login

  1. Given the user "known_user"
  2. When I go to the main page
  3. Then I should see the login form
  4. When I fill in "login" with "<login>"
  5. And I fill in "password" with "<password>"
  6. And I press "Log In"
  7. Then the login request should fail
  8. And I should see the error message "Login or Password incorrect"

Examples:

loginpassword
unknown_user
known_user
wrong_password
known_userpass
unknown_userwrong_password
unknown_userknown_userpass
known_userwrong_password

Users want to know that nobody can masquerade as them. We want to extend trust

only to visitors who present the appropriate credentials. Everyone wants this
identity verification to be as secure and convenient as possible.

Feature: Logging in
As an anonymous user with an account
I want to log in to my account
So that I can be myself

#
# Log in: get form
#

Scenario: Anonymous user can get a login form.

  1. Given I am logged out
  2. When I go to "/login"
  3. Then I should be at the "sessions/new" page
#
# Log in successfully, but don't remember me
#

Scenario: Anonymous user can log in

  1. Given an "activated" user named "reggie" exists
  2. And I am logged out
  3. When I go to "/login"
  4. And I fill in "Login" with "reggie"
  5. And I fill in "Password" with "password"
  6. And I press "Log in"
  7. Then I should be at the "dashboard/index" page

Visitors may create an account, but for those who are not already in the

system an someone must activate the account for them before it can be used.

Feature: Activating an account
As a registered, but not yet activated, user
I want to be able to activate my account
So that I can log in to the site

Scenario: Not-yet-activated user can activate her account

  1. Given a registered user named 'Reggie' # need to rewrite

Feature: Matt's example with a comment before a step

Scenario: Upload an image for an artist and create a concert in the process

  1. Given I am logged in to my account
  2. And there is one Artist named "Pixies"
  3. And there is one Venue
  4. When I visit the page for the Artist
  5. And I follow "add a photo"
  6. And I upload an Image
  7. And I press "Search Pixies concerts"
  8. And I follow "Add a new Concert"
  9. And I fill in new Concert information
  10. And I press "Preview"
  11. And I press "Add concert"
  12. And I press "Submit"
  13. Then my Concert should exist with 1 Image

Feature: Cucumber command line

In order to write better software
Developers should be able to execute requirements as tests

Scenario: Pending Scenario at the end of a file with whitespace after it

    Feature: Tagged hooks

    In order to provide more flexible setups
    I should be able to specify exactly
    where hooks are executed

    @i_am_so_special

    Scenario: Yes I am

    1. When special me goes to town

    Feature: Unsubstituted argument placeholder

    Scenario Outline: See Annual Leave Details (as Management & Human Resource)

    1. Given the following users exist in the system
      nameemailrole_assignmentsgroup_memberships
      Janejane@fmail.com<role>Sales (manager)
      Maxmax@fmail.comSales (member)
      Carolcarol@fmail.comSales (member)
      Catcat@fmail.com

    Examples:

    role
    HUMAN RESOURCE

    Users want to use cucumber, so tests are necessary to verify

    it is all working as expected

    Feature: Using the Console Formatter
    In order to verify this error
    I want to run this feature using the progress format
    So that it can be fixed

    Scenario: A normal feature

    1. Given I have a pending step
      TODO (Cucumber::Pending)
      ./features/step_definitons/tickets_steps.rb:57:in `/^I have a pending step$/'
      features/241.feature:10:in `Given I have a pending step'
    2. When I run this feature with the progress format
    3. Then I should get a no method error for 'backtrace_line'

    Feature: https://rspec.lighthouseapp.com/projects/16211/tickets/246-distorted-console-output-for-slightly-complicated-step-regexp-match

    Scenario: See "No Record(s) Found" for Zero Existing

    1. Given no public holiday exists in the system

    Feature: pending method causes failure in Scenario Outlines

    Scenario Outline: blah

    1. Given this is pending until we fix it
    2. Given context with <Stuff>
    3. When action
    4. Then outcome with <Blah>

    Examples:

    StuffBlah
    CheesePepper Jack
    TODO (Cucumber::Pending)
    ./features/step_definitons/248_steps.rb:2:in `/^this is pending until we fix it$/'
    features/248.feature:4:in `Given this is pending until we fix it'

    Feature: Background

    In for background to work properly
    As a user
    I want it to run transactionally and only once when I call an individual scenario

    Background:

    1. Given plop

    Scenario: Barping

    1. When I barp

    Scenario: Wibbling

    1. When I wibble

    Feature: pystring indentaion testcase

    Scenario: example of correct indentation

    1. Given multiline string
        I'm a cucumber and I'm ok
      I sleep all night and test all day
    2. Then string is
        I'm a cucumber and I'm ok
      I sleep all night and test all day

    Scenario: example of wrong indentation

    1. Given I am in tickets/features/279
    2. When I run cucumber -q wrong.feature_
    3. Then it should fail with
    4. And STDERR should match
      wrong.feature_:8:10: Parse error

    Feature https://rspec.lighthouseapp.com/projects/16211/tickets/301

    Background: A background

    1. Given whatever

    Scenario: VB is not cool

    1. Then VB should not be cool

    Feature: woo yeah

    Background:

    1. Given passing step without a table

    Feature: Outlines

    In order to re-use scenario table values
    As a citizen of Cucumbia
    I want to explicitly mark the parameters in a scenario outline

    Scenario Outline: controlling order

    1. Given there are <start> cucumbers
    2. When I eat <eat> cucumbers
    3. Then I should have <left> cucumbers

    Examples:

    leftstarteat
    7125
    15205

    Scenario Outline: reusing place holder

    1. Given there are <start> cucumbers
    2. When I eat <eat> cucumbers
    3. Then I should have <left> cucumbers
    4. And I should have <eat> cucumbers in my belly

    Examples: Lots of cukes

    starteatleft
    1257
    20515

    Examples: Ridiculous amounts of cukes

    starteatleft
    1205070
    20050150

    Scenario Outline: no placeholders

    1. Given there are 12 cucumbers
    2. When I eat 5 cucumbers
    3. Then I should have 7 cucumbers

    Examples:

    starteatleft
    1257
    20515

    Scenario Outline: using '<' and '>' not as placeholder

    1. Given the belly space is < 12 and > 6
    2. And there are <start> cucumbers
    3. When I eat <eat> cucumbers
    4. Then I should have <left> cucumbers

    Examples:

    starteatleft
    1257
    20515

    Scenario Outline: with step tables

    1. Given I have the following fruits in my pantry
      namequantity
      cucumbers10
      strawberrys5
      apricots7
    2. When I eat <number> <fruits> from the pantry
    3. Then I should have <left> <fruits> in the pantry

    Examples:

    numberfruitsleft
    2cucumbers8
    4strawberrys1
    2apricots5

    Scenario Outline: placeholder in a multiline string

    1. Given my shopping list
        Must buy some 
    2. Then my shopping list should equal
        Must buy some cucumbers

    Examples:

    fruits
    cucumbers

    Scenario Outline: placeholder in step table

    1. Given I have the following fruits in my pantry
      namequantity
      cucumbers<quant_cukes>
      strawberrys<quant_straw>
    2. When I eat <number> <fruits> from the pantry
    3. Then I should have <left> <fruits> in the pantry

    Examples:

    quant_cukesquant_strawnumberfruitsleft
    1052cucumbers8
    554strawberrys1

    Feature: Cucumber

    In order to have a happy user base
    As a Cucumber user
    I don't want no stinkin bugs

    Scenario: RSpec be_*

    1. Given be_empty

    Scenario: Call step from step

    1. Given nested step is called
    2. Then nested step should be executed

    Scenario: Call step from step using text table

    1. Given nested step is called using text table
    2. Then nested step should be executed

    Scenario: Reading a table

    1. Given the following table
      bornworking
      OsloLondon
    2. Then I should be working in London
    3. And I should be born in Oslo
    4. And I should see a multiline string like
      A string
      that spans
      several lines
    43 scenarios (12 undefined, 2 pending, 29 passed)
    173 steps (5 skipped, 89 undefined, 2 pending, 77 passed)
    0m0.701s