Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature: login as proper user type
- As an [ESA, Recology, SFE] Field Agent, Recology Worker, or ESA Admin
- So that I can access the ESA Web App and be authorized for specific permissions
- I want to see that I am logged in as the correct account type
- Background: different account types exist and on ESA Web App home page
- Given the following users exist:
- | email | password | user_type | organization |
- | esa_field@test.com | test1234 | Field Agent | ESA |
- | reco_field@test.com | test1234 | Field Agent | Recology |
- | sfe_field@test.com | test1234 | Field Agent | SFE |
- | reco_worker@test.com | test1234 | Worker | Recology |
- | esa_admin@test.com | test1234 | Admin | ESA |
- And I am on the sign in page
- Scenario: login as an ESA Field Agent
- When I fill in "Email" with "esa_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "User: esa_field@test.com"
- And I should see "Type: ESA Field Agent"
- And I should not see "Type: Recology Field Agent"
- And I should not see "Type: SFE Field Agent"
- And I should not see "Type: Recology Worker"
- And I should not see "Type: ESA Admin"
- Scenario: login as an Recology Field Agent
- When I fill in "Email" with "reco_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "User: reco_field@test.com"
- And I should not see "Type: ESA Field Agent"
- And I should see "Type: Recology Field Agent"
- And I should not see "Type: SFE Field Agent"
- And I should not see "Type: Recology Worker"
- And I should not see "Type: ESA Admin"
- Scenario: login as an SFE Field Agent
- When I fill in "Email" with "sfe_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "User: sfe_field@test.com"
- And I should not see "Type: ESA Field Agent"
- And I should not see "Type: Recology Field Agent"
- And I should see "Type: SFE Field Agent"
- And I should not see "Type: Recology Worker"
- And I should not see "Type: ESA Admin"
- Scenario: login as an Recology Worker
- When I fill in "Email" with "reco_worker@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "User: reco_worker@test.com"
- And I should not see "Type: ESA Field Agent"
- And I should not see "Type: Recology Field Agent"
- And I should not see "Type: SFE Field Agent"
- And I should see "Type: Recology Worker"
- And I should not see "Type: ESA Admin"
- Scenario: login as an ESA Admin
- When I fill in "Email" with "esa_admin@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "User: esa_admin@test.com"
- And I should not see "Type: ESA Field Agent"
- And I should not see "Type: Recology Field Agent"
- And I should not see "Type: SFE Field Agent"
- And I should not see "Type: Recology Worker"
- And I should see "Type: ESA Admin"
- Feature: login as proper user type
- As an [ESA, Recology, SFE] Field Agent, Recology Worker, or ESA Admin
- So that I can access the ESA Web App and be authorized for specific permissions
- I want to see the correct permissions for my account type, and not permissions for other account types
- Background: different account types exist and on ESA Web App home page
- Given the following users exist:
- | email | password | user_type | organization |
- | esa_field@test.com | test1234 | Field Agent | ESA |
- | reco_field@test.com | test1234 | Field Agent | Recology |
- | sfe_field@test.com | test1234 | Field Agent | SFE |
- | reco_worker@test.com | test1234 | Worker | Recology |
- | esa_admin@test.com | test1234 | Admin | ESA |
- And I am on the sign in page
- Scenario: login as an ESA Field Agent and see Activity Reports and Service Level Reports but not Users
- When I fill in "Email" with "esa_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "Activity Reports"
- And I should see "Service Level Reports"
- And I should not see "Manage Users"
- Scenario: login as an Recology Field Agent and see Activity Reports and Service Level Reports but not Users
- When I fill in "Email" with "reco_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "Activity Reports"
- And I should see "Service Level Reports"
- And I should not see "Manage Users"
- Scenario: login as an SFE Field Agent and see Activity Reports and Service Level Reports but not Users
- When I fill in "Email" with "sfe_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "Activity Reports"
- And I should see "Service Level Reports"
- And I should not see "Manage Users"
- Scenario: login as an Recology Worker and see Service Level Reports but not Activity Reports and Users
- When I fill in "Email" with "reco_worker@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should not see "Activity Reports"
- And I should see "Service Level Reports"
- And I should not see "Manage Users"
- Scenario: login as an ESA Admin and see Activity Reports, Service Level Reports, and Users
- When I fill in "Email" with "esa_admin@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "Activity Reports"
- And I should see "Service Level Reports"
- And I should see "Manage Users"
- Feature: CRUD Service Level Report
- As an [ESA, Recology, SFE] Field Agent, Recology Worker, ESA Admin
- So that I can use the ESA Web App database to manipulate Service Level Reports
- I want to be able to Create, Read, Update, and Delete Service Level Reports
- Background: different account types exist and on Service Level Report Index page
- Given the following users exist:
- | email | password | user_type | organization |
- | esa_field@test.com | test1234 | Field Agent | ESA |
- | reco_field@test.com | test1234 | Field Agent | Recology |
- | sfe_field@test.com | test1234 | Field Agent | SFE |
- | reco_worker@test.com | test1234 | Worker | Recology |
- | esa_admin@test.com | test1234 | Admin | ESA |
- And I am on the sign in page
- And I fill in "Email" with "reco_worker@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- And I click "Service Level Reports"
- Then I should be on the Service Level Report Index page
- Scenario: create an Service Level Report
- When I click "New Service Level Report"
- Then I should be on Service Level Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Service level report was successfully created."
- When I follow "Back"
- Then I should be on the Service Level Report Index page
- And I should see "TestForm"
- Scenario: read (view) an Service Level Report
- When I click "New Service Level Report"
- Then I should be on Service Level Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Service level report was successfully created."
- When I follow "Back"
- Then I should be on the Service Level Report Index page
- When I click "View" within "TestForm"
- Then I should see "TestForm"
- Scenario: update an Service Level Report
- When I click "New Service Level Report"
- Then I should be on Service Level Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Service level report was successfully created."
- When I follow "Back"
- Then I should be on the Service Level Report Index page
- When I click "Edit" within "TestForm"
- Then I should be on the Edit page of the Service Level Report with id "1"
- When I fill in "Title" with "Test Form Mutated"
- And I press "Submit"
- Then I should see "Service level report was successfully updated."
- When I follow "Back"
- Then I should be on the Service Level Report Index page
- And I should see "Test Form Mutated"
- Scenario: delete an Service Level Report
- When I click "New Service Level Report"
- Then I should be on Service Level Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Service level report was successfully created."
- When I follow "Back"
- Then I should be on the Service Level Report Index page
- When I click "Destroy" within "TestForm"
- Then I should be on the Service Level Report Index page
- And I should not see "TestForm"
- Feature: CRUD Activity Report
- As an [ESA, Recology, SFE] Field Agent, or ESA Admin
- So that I can use the ESA Web App database to manipulate Service Level Reports
- I want to be able to Create, Read, Update, and Delete Activity Reports
- Background: different account types exist and on Activity Report Index page
- Given the following users exist:
- | email | password | user_type | organization |
- | esa_field@test.com | test1234 | Field Agent | ESA |
- | reco_field@test.com | test1234 | Field Agent | Recology |
- | sfe_field@test.com | test1234 | Field Agent | SFE |
- | reco_worker@test.com | test1234 | Worker | Recology |
- | esa_admin@test.com | test1234 | Admin | ESA |
- And I am on the sign in page
- And I fill in "Email" with "esa_field@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- Then I should see "Activity Reports"
- And I click "Activity Reports"
- Then I should be on the Activity Report Index page
- Scenario: create an Activity Report
- When I click "New Activity Report"
- Then I should be on the Activity Report New page
- When I fill in "Title" with "Test Form"
- And I press "Submit"
- Then I should see "Activity report was successfully created."
- When I follow "Back"
- Then I should be on the Activity Report Index page
- And I should see "Test Form"
- Scenario: read (view) an Activity Report
- When I click "New Activity Report"
- Then I should be on the Activity Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Activity report was successfully created."
- When I follow "Back"
- Then I should be on the Activity Report Index page
- When I click "View" within "TestForm"
- Then I should see "TestForm"
- Scenario: update an Activity Report
- When I click "New Activity Report"
- Then I should be on the Activity Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Activity report was successfully created."
- When I follow "Back"
- Then I should be on the Activity Report Index page
- When I click "Edit" within "TestForm"
- Then I should be on the Edit page of the Activity Report with id "1"
- When I fill in "Title" with "Test Form Mutated"
- And I press "Submit"
- Then I should see "Activity report was successfully updated."
- When I follow "Back"
- Then I should be on the Activity Report Index page
- And I should see "Test Form Mutated"
- Scenario: delete an Activity Report
- When I click "New Activity Report"
- Then I should be on the Activity Report New page
- When I fill in "Title" with "TestForm"
- And I press "Submit"
- Then I should see "Activity report was successfully created."
- When I follow "Back"
- Then I should be on the Activity Report Index page
- When I click "Destroy" within "TestForm"
- Then I should be on the Activity Report Index page
- And I should not see "TestForm"
- Feature: admin CRUD Users -- NOTE: only ESA Field Agent for now
- As an ESA Admin
- So that I can Administer the ESA Web App’s users
- I want to be able to Create, Read, Update, and Delete [ESA, Recology, SFE] Field Agents, ESA Admins, and Recology workers
- Background: different account types exist and on Admin User Index page
- Given the following users exist:
- | email | password | user_type | organization |
- | esa_field@test.com | test1234 | Field Agent | ESA |
- | reco_field@test.com | test1234 | Field Agent | Recology |
- | sfe_field@test.com | test1234 | Field Agent | SFE |
- | reco_worker@test.com | test1234 | Worker | Recology |
- | esa_admin@test.com | test1234 | Admin | ESA |
- And I am on the sign in page
- And I fill in "Email" with "esa_admin@test.com"
- And I fill in "Password" with "test1234"
- And I press "Log in"
- And I follow "Manage Users"
- Then I should be on the User Index page
- Scenario: See users on the user index page
- When I am on the User Index page
- Then I should see "reco_worker@test.com"
- Scenario: read (view) a newly created ESA Field Agent User
- When I click "View" within "esa_field@test.com"
- Then I should be on the View page of the User with id "1"
- Scenario: delete an ESA Field Agent User Report
- When I am on the User Index page
- When I click "Destroy" within "esa_field@test.com"
- Then I should be on the User Index page
- And I should not see "test_person"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement