Advertisement
Guest User

Group #26 Tests

a guest
Apr 1st, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.81 KB | None | 0 0
  1. Feature: login as proper user type
  2.  
  3. As an [ESA, Recology, SFE] Field Agent, Recology Worker, or ESA Admin
  4. So that I can access the ESA Web App and be authorized for specific permissions
  5. I want to see that I am logged in as the correct account type
  6.  
  7. Background: different account types exist and on ESA Web App home page
  8.  
  9. Given the following users exist:
  10. | email | password | user_type | organization |
  11. | esa_field@test.com | test1234 | Field Agent | ESA |
  12. | reco_field@test.com | test1234 | Field Agent | Recology |
  13. | sfe_field@test.com | test1234 | Field Agent | SFE |
  14. | reco_worker@test.com | test1234 | Worker | Recology |
  15. | esa_admin@test.com | test1234 | Admin | ESA |
  16.  
  17. And I am on the sign in page
  18.  
  19. Scenario: login as an ESA Field Agent
  20. When I fill in "Email" with "esa_field@test.com"
  21. And I fill in "Password" with "test1234"
  22. And I press "Log in"
  23. Then I should see "User: esa_field@test.com"
  24. And I should see "Type: ESA Field Agent"
  25. And I should not see "Type: Recology Field Agent"
  26. And I should not see "Type: SFE Field Agent"
  27. And I should not see "Type: Recology Worker"
  28. And I should not see "Type: ESA Admin"
  29.  
  30. Scenario: login as an Recology Field Agent
  31. When I fill in "Email" with "reco_field@test.com"
  32. And I fill in "Password" with "test1234"
  33. And I press "Log in"
  34. Then I should see "User: reco_field@test.com"
  35. And I should not see "Type: ESA Field Agent"
  36. And I should see "Type: Recology Field Agent"
  37. And I should not see "Type: SFE Field Agent"
  38. And I should not see "Type: Recology Worker"
  39. And I should not see "Type: ESA Admin"
  40.  
  41. Scenario: login as an SFE Field Agent
  42. When I fill in "Email" with "sfe_field@test.com"
  43. And I fill in "Password" with "test1234"
  44. And I press "Log in"
  45. Then I should see "User: sfe_field@test.com"
  46. And I should not see "Type: ESA Field Agent"
  47. And I should not see "Type: Recology Field Agent"
  48. And I should see "Type: SFE Field Agent"
  49. And I should not see "Type: Recology Worker"
  50. And I should not see "Type: ESA Admin"
  51.  
  52. Scenario: login as an Recology Worker
  53. When I fill in "Email" with "reco_worker@test.com"
  54. And I fill in "Password" with "test1234"
  55. And I press "Log in"
  56. Then I should see "User: reco_worker@test.com"
  57. And I should not see "Type: ESA Field Agent"
  58. And I should not see "Type: Recology Field Agent"
  59. And I should not see "Type: SFE Field Agent"
  60. And I should see "Type: Recology Worker"
  61. And I should not see "Type: ESA Admin"
  62.  
  63. Scenario: login as an ESA Admin
  64. When I fill in "Email" with "esa_admin@test.com"
  65. And I fill in "Password" with "test1234"
  66. And I press "Log in"
  67. Then I should see "User: esa_admin@test.com"
  68. And I should not see "Type: ESA Field Agent"
  69. And I should not see "Type: Recology Field Agent"
  70. And I should not see "Type: SFE Field Agent"
  71. And I should not see "Type: Recology Worker"
  72. And I should see "Type: ESA Admin"
  73.  
  74. Feature: login as proper user type
  75.  
  76. As an [ESA, Recology, SFE] Field Agent, Recology Worker, or ESA Admin
  77. So that I can access the ESA Web App and be authorized for specific permissions
  78. I want to see the correct permissions for my account type, and not permissions for other account types
  79.  
  80. Background: different account types exist and on ESA Web App home page
  81.  
  82. Given the following users exist:
  83. | email | password | user_type | organization |
  84. | esa_field@test.com | test1234 | Field Agent | ESA |
  85. | reco_field@test.com | test1234 | Field Agent | Recology |
  86. | sfe_field@test.com | test1234 | Field Agent | SFE |
  87. | reco_worker@test.com | test1234 | Worker | Recology |
  88. | esa_admin@test.com | test1234 | Admin | ESA |
  89.  
  90. And I am on the sign in page
  91.  
  92. Scenario: login as an ESA Field Agent and see Activity Reports and Service Level Reports but not Users
  93. When I fill in "Email" with "esa_field@test.com"
  94. And I fill in "Password" with "test1234"
  95. And I press "Log in"
  96. Then I should see "Activity Reports"
  97. And I should see "Service Level Reports"
  98. And I should not see "Manage Users"
  99.  
  100. Scenario: login as an Recology Field Agent and see Activity Reports and Service Level Reports but not Users
  101. When I fill in "Email" with "reco_field@test.com"
  102. And I fill in "Password" with "test1234"
  103. And I press "Log in"
  104. Then I should see "Activity Reports"
  105. And I should see "Service Level Reports"
  106. And I should not see "Manage Users"
  107.  
  108. Scenario: login as an SFE Field Agent and see Activity Reports and Service Level Reports but not Users
  109. When I fill in "Email" with "sfe_field@test.com"
  110. And I fill in "Password" with "test1234"
  111. And I press "Log in"
  112. Then I should see "Activity Reports"
  113. And I should see "Service Level Reports"
  114. And I should not see "Manage Users"
  115.  
  116. Scenario: login as an Recology Worker and see Service Level Reports but not Activity Reports and Users
  117. When I fill in "Email" with "reco_worker@test.com"
  118. And I fill in "Password" with "test1234"
  119. And I press "Log in"
  120. Then I should not see "Activity Reports"
  121. And I should see "Service Level Reports"
  122. And I should not see "Manage Users"
  123.  
  124. Scenario: login as an ESA Admin and see Activity Reports, Service Level Reports, and Users
  125. When I fill in "Email" with "esa_admin@test.com"
  126. And I fill in "Password" with "test1234"
  127. And I press "Log in"
  128. Then I should see "Activity Reports"
  129. And I should see "Service Level Reports"
  130. And I should see "Manage Users"
  131.  
  132. Feature: CRUD Service Level Report
  133.  
  134. As an [ESA, Recology, SFE] Field Agent, Recology Worker, ESA Admin
  135. So that I can use the ESA Web App database to manipulate Service Level Reports
  136. I want to be able to Create, Read, Update, and Delete Service Level Reports
  137.  
  138. Background: different account types exist and on Service Level Report Index page
  139.  
  140. Given the following users exist:
  141. | email | password | user_type | organization |
  142. | esa_field@test.com | test1234 | Field Agent | ESA |
  143. | reco_field@test.com | test1234 | Field Agent | Recology |
  144. | sfe_field@test.com | test1234 | Field Agent | SFE |
  145. | reco_worker@test.com | test1234 | Worker | Recology |
  146. | esa_admin@test.com | test1234 | Admin | ESA |
  147.  
  148. And I am on the sign in page
  149. And I fill in "Email" with "reco_worker@test.com"
  150. And I fill in "Password" with "test1234"
  151. And I press "Log in"
  152. And I click "Service Level Reports"
  153. Then I should be on the Service Level Report Index page
  154.  
  155. Scenario: create an Service Level Report
  156. When I click "New Service Level Report"
  157. Then I should be on Service Level Report New page
  158. When I fill in "Title" with "TestForm"
  159. And I press "Submit"
  160. Then I should see "Service level report was successfully created."
  161. When I follow "Back"
  162. Then I should be on the Service Level Report Index page
  163. And I should see "TestForm"
  164.  
  165. Scenario: read (view) an Service Level Report
  166. When I click "New Service Level Report"
  167. Then I should be on Service Level Report New page
  168. When I fill in "Title" with "TestForm"
  169. And I press "Submit"
  170. Then I should see "Service level report was successfully created."
  171. When I follow "Back"
  172. Then I should be on the Service Level Report Index page
  173. When I click "View" within "TestForm"
  174. Then I should see "TestForm"
  175.  
  176. Scenario: update an Service Level Report
  177. When I click "New Service Level Report"
  178. Then I should be on Service Level Report New page
  179. When I fill in "Title" with "TestForm"
  180. And I press "Submit"
  181. Then I should see "Service level report was successfully created."
  182. When I follow "Back"
  183. Then I should be on the Service Level Report Index page
  184. When I click "Edit" within "TestForm"
  185. Then I should be on the Edit page of the Service Level Report with id "1"
  186. When I fill in "Title" with "Test Form Mutated"
  187. And I press "Submit"
  188. Then I should see "Service level report was successfully updated."
  189. When I follow "Back"
  190. Then I should be on the Service Level Report Index page
  191. And I should see "Test Form Mutated"
  192.  
  193. Scenario: delete an Service Level Report
  194. When I click "New Service Level Report"
  195. Then I should be on Service Level Report New page
  196. When I fill in "Title" with "TestForm"
  197. And I press "Submit"
  198. Then I should see "Service level report was successfully created."
  199. When I follow "Back"
  200. Then I should be on the Service Level Report Index page
  201. When I click "Destroy" within "TestForm"
  202. Then I should be on the Service Level Report Index page
  203. And I should not see "TestForm"
  204.  
  205. Feature: CRUD Activity Report
  206.  
  207. As an [ESA, Recology, SFE] Field Agent, or ESA Admin
  208. So that I can use the ESA Web App database to manipulate Service Level Reports
  209. I want to be able to Create, Read, Update, and Delete Activity Reports
  210.  
  211. Background: different account types exist and on Activity Report Index page
  212.  
  213. Given the following users exist:
  214. | email | password | user_type | organization |
  215. | esa_field@test.com | test1234 | Field Agent | ESA |
  216. | reco_field@test.com | test1234 | Field Agent | Recology |
  217. | sfe_field@test.com | test1234 | Field Agent | SFE |
  218. | reco_worker@test.com | test1234 | Worker | Recology |
  219. | esa_admin@test.com | test1234 | Admin | ESA |
  220.  
  221. And I am on the sign in page
  222. And I fill in "Email" with "esa_field@test.com"
  223. And I fill in "Password" with "test1234"
  224. And I press "Log in"
  225. Then I should see "Activity Reports"
  226. And I click "Activity Reports"
  227. Then I should be on the Activity Report Index page
  228.  
  229. Scenario: create an Activity Report
  230. When I click "New Activity Report"
  231. Then I should be on the Activity Report New page
  232. When I fill in "Title" with "Test Form"
  233. And I press "Submit"
  234. Then I should see "Activity report was successfully created."
  235. When I follow "Back"
  236. Then I should be on the Activity Report Index page
  237. And I should see "Test Form"
  238.  
  239. Scenario: read (view) an Activity Report
  240. When I click "New Activity Report"
  241. Then I should be on the Activity Report New page
  242. When I fill in "Title" with "TestForm"
  243. And I press "Submit"
  244. Then I should see "Activity report was successfully created."
  245. When I follow "Back"
  246. Then I should be on the Activity Report Index page
  247. When I click "View" within "TestForm"
  248. Then I should see "TestForm"
  249.  
  250. Scenario: update an Activity Report
  251. When I click "New Activity Report"
  252. Then I should be on the Activity Report New page
  253. When I fill in "Title" with "TestForm"
  254. And I press "Submit"
  255. Then I should see "Activity report was successfully created."
  256. When I follow "Back"
  257. Then I should be on the Activity Report Index page
  258. When I click "Edit" within "TestForm"
  259. Then I should be on the Edit page of the Activity Report with id "1"
  260. When I fill in "Title" with "Test Form Mutated"
  261. And I press "Submit"
  262. Then I should see "Activity report was successfully updated."
  263. When I follow "Back"
  264. Then I should be on the Activity Report Index page
  265. And I should see "Test Form Mutated"
  266.  
  267. Scenario: delete an Activity Report
  268. When I click "New Activity Report"
  269. Then I should be on the Activity Report New page
  270. When I fill in "Title" with "TestForm"
  271. And I press "Submit"
  272. Then I should see "Activity report was successfully created."
  273. When I follow "Back"
  274. Then I should be on the Activity Report Index page
  275. When I click "Destroy" within "TestForm"
  276. Then I should be on the Activity Report Index page
  277. And I should not see "TestForm"
  278.  
  279. Feature: admin CRUD Users -- NOTE: only ESA Field Agent for now
  280.  
  281. As an ESA Admin
  282. So that I can Administer the ESA Web App’s users
  283. I want to be able to Create, Read, Update, and Delete [ESA, Recology, SFE] Field Agents, ESA Admins, and Recology workers
  284.  
  285. Background: different account types exist and on Admin User Index page
  286.  
  287. Given the following users exist:
  288. | email | password | user_type | organization |
  289. | esa_field@test.com | test1234 | Field Agent | ESA |
  290. | reco_field@test.com | test1234 | Field Agent | Recology |
  291. | sfe_field@test.com | test1234 | Field Agent | SFE |
  292. | reco_worker@test.com | test1234 | Worker | Recology |
  293. | esa_admin@test.com | test1234 | Admin | ESA |
  294.  
  295. And I am on the sign in page
  296. And I fill in "Email" with "esa_admin@test.com"
  297. And I fill in "Password" with "test1234"
  298. And I press "Log in"
  299. And I follow "Manage Users"
  300. Then I should be on the User Index page
  301.  
  302. Scenario: See users on the user index page
  303. When I am on the User Index page
  304. Then I should see "reco_worker@test.com"
  305.  
  306. Scenario: read (view) a newly created ESA Field Agent User
  307. When I click "View" within "esa_field@test.com"
  308. Then I should be on the View page of the User with id "1"
  309.  
  310. Scenario: delete an ESA Field Agent User Report
  311. When I am on the User Index page
  312. When I click "Destroy" within "esa_field@test.com"
  313. Then I should be on the User Index page
  314. And I should not see "test_person"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement