Logo: Relish

  1. Sign in

Project: Relevant

Admin users

In order to authorize users to use the site
As the admin
I want add and remove user accounts

Background
Given
there are users registered
Scenarios
Access denied
Given
I am not signed in
When
I go to the users page
Then
I should see "Access denied"
And
I should be on the home page
Access denied non-admins
Given
I am signed in
When
I go to the users page
Then
I should see "Access denied"
And
I should be on the home page
List of users
Given
I am signed in as an admin
When
I go to the users page
Then
I should see "[email protected]"
And
should see "[email protected]"
Create a user
Given
I am signed in as an admin
When
I go to the users page
And
follow "Add a user"
Then
I should be on the new user page
When
I fill in "Email" with "[email protected]"
And
fill in "Password" with "secret"
And
fill in "Confirm Password" with "secret"
And
press "Sign up"
Then
I should be on the users page
And
I should see "User successfully added"
And
I should see "[email protected]"
Delete a user
Given
I am signed in as an admin
When
I go to the users page
When
I follow "delete" on the row containing "[email protected]"
And
I should see "User deleted"
And
I should not see "[email protected]"
Make user admin
Given
I am signed in as an admin
When
I go to the users page
And
I follow "normal" on the row containing "[email protected]"
Then
I should see "USER IS AN ADMIN"
And
I should see "ADMIN" on the row containing "[email protected]"
Un-admin a user
Given
I am signed in as an admin
When
I go to the users page
And
I follow "normal" on the row containing "[email protected]"
Then
I should see "USER IS AN ADMIN"
When
I sign out
And
I sign in as "[email protected]"
And
I go to the users page
When
I follow "ADMIN" on the row containing "[email protected]"
Then
I should see "normal" on the row containing "[email protected]"

Last published about 7 years ago by linojon.