Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Running 5 scenarios
- Story: logging in
- As an account holder
- I want to log in
- So that I can take ownership of my submissions to the site
- Scenario: logging in successfully
- Given a user with email "user@example.com" and passphrase "passphrase1000"
- When I go to the login form
- And I fill in the "email" field with "user@example.com"
- And I fill in the "passphrase" field with "passphrase1000"
- And I click the "Log in" button
- Then the page should show "Successfully logged in"
- Scenario: logging in with a bad passphrase
- Given a user with email "user@example.com" and passphrase "passphrase1000"
- When I go to the login form
- And I fill in the "email" field with "user@example.com"
- And I fill in the "passphrase" field with "whoops!"
- And I click the "Log in" button
- Then the page should show "Invalid email or passphrase"
- Scenario: logging in with a bad email
- Given a user with email "user@example.com" and passphrase "passphrase1000"
- When I go to the login form
- And I fill in the "email" field with "bad@bad.com"
- And I fill in the "passphrase" field with "passphrase1000"
- And I click the "Log in" button
- Then the page should show "Invalid email or passphrase"
- Story: logging out
- As an account holder
- I want to log out
- So that nobody using my machine can impersonate me
- Scenario: logging out when logged-in
- Given a logged-in user
- When I logout
- Then the page should show "You have logged out successfully"
- Scenario: logging out when not logged-in
- Given an anonymous user
- When I logout
- Then the page should show "Can't log out \(weren't logged in\)"
- 5 scenarios: 5 succeeded, 0 failed, 0 pending
Add Comment
Please, Sign In to add comment