Skip to content

Commit

Permalink
Rewrote login feature as a scenario outline with remember-me-checked/…
Browse files Browse the repository at this point in the history
…remember-me-unchecked versions and additional steps to check whether logged in after restarting browser.
  • Loading branch information
JamesFerguson committed Dec 17, 2010
1 parent e3b2ef2 commit 759fc62
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion features/user_login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@ Feature: Login existing user
| email | password |
| my_email@domain.com | 1234567890 |

Scenario: Login existing user
Scenario Outline: Login existing user
Given I am on the login user page
Then I should not see "Login" within "a"
And I should not see "Sign up"
And I should not see "Sign in"
When I fill in "Email" with "my_email@domain.com"
And I fill in "Password" with "1234567890"
And I <check_or_dont> "Remember me"
And I press "Login"
Then I should see a flash notice "You have logged in successfully."
And I should see "You are logged in as my_email@domain.com."
And I should be on my show user page
When I restart my browser
And I am on my show user page
Then I should be on <final_page>
And I <should_or_not> see "You need to login or register before continuing"

Examples:
| check_or_dont | final_page | should_or_not |
| check | my show user page | should not |
| uncheck | the login user page | should |

0 comments on commit 759fc62

Please sign in to comment.