Guest User

Untitled

a guest
May 5th, 2018
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. Running 5 scenarios
  2.  
  3. Story: logging in
  4.  
  5.  
  6. As an account holder
  7. I want to log in
  8. So that I can take ownership of my submissions to the site
  9.  
  10.  
  11. Scenario: logging in successfully
  12.  
  13. Given a user with email "user@example.com" and passphrase "passphrase1000"
  14.  
  15. When I go to the login form
  16. And I fill in the "email" field with "user@example.com"
  17. And I fill in the "passphrase" field with "passphrase1000"
  18. And I click the "Log in" button
  19.  
  20. Then the page should show "Successfully logged in"
  21.  
  22. Scenario: logging in with a bad passphrase
  23.  
  24. Given a user with email "user@example.com" and passphrase "passphrase1000"
  25.  
  26. When I go to the login form
  27. And I fill in the "email" field with "user@example.com"
  28. And I fill in the "passphrase" field with "whoops!"
  29. And I click the "Log in" button
  30.  
  31. Then the page should show "Invalid email or passphrase"
  32.  
  33. Scenario: logging in with a bad email
  34.  
  35. Given a user with email "user@example.com" and passphrase "passphrase1000"
  36.  
  37. When I go to the login form
  38. And I fill in the "email" field with "bad@bad.com"
  39. And I fill in the "passphrase" field with "passphrase1000"
  40. And I click the "Log in" button
  41.  
  42. Then the page should show "Invalid email or passphrase"
  43.  
  44. Story: logging out
  45.  
  46.  
  47. As an account holder
  48. I want to log out
  49. So that nobody using my machine can impersonate me
  50.  
  51.  
  52. Scenario: logging out when logged-in
  53.  
  54. Given a logged-in user
  55.  
  56. When I logout
  57.  
  58. Then the page should show "You have logged out successfully"
  59.  
  60. Scenario: logging out when not logged-in
  61.  
  62. Given an anonymous user
  63.  
  64. When I logout
  65.  
  66. Then the page should show "Can't log out \(weren't logged in\)"
  67.  
  68. 5 scenarios: 5 succeeded, 0 failed, 0 pending
Add Comment
Please, Sign In to add comment