-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efd9754
commit ab3c373
Showing
28 changed files
with
592 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
%tr | ||
%td= user.created_at.strftime('%b %d %Y') | ||
%td= user.created_at.strftime("%m/%d/%Y") | ||
%td= user.display_name | ||
%td= display_if_is?(user, 'field_operator') | ||
%td= display_if_is?(user, 'organization_manager') | ||
%td= display_if_is?(user, 'site_admin') | ||
%td= display_if_is?(user, 'admin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#body_wrap | ||
#access_denied | ||
%h1=t '.access_denied' | ||
=t('.access_denied_text1') | ||
= link_to t('.access_denied_sign_out'), sign_out_path | ||
=t('.access_denied_text2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#body_wrap | ||
#access_denied | ||
%h1=t '.access_denied' | ||
=t('.access_denied_text') | ||
= link_to t('.access_denied_sign_in'), sign_in_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Feature: Admin visits home page | ||
|
||
In order to manage the ReliefHub site | ||
As an admin | ||
I want to see the "Admin" link on the home page. | ||
|
||
Scenario: Admin visits home page | ||
Given the following user exists: | ||
| first_name | last_name | email | password | password_confirmation | roles | | ||
| Admin | User | admin@test.com | secret | secret | admin | | ||
And I sign in as "admin@test.com/secret" | ||
And I am on the homepage | ||
And I should see "Admin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Feature: View ReliefHub user list | ||
As a ReliefHub admin user | ||
I want to be able to view all existing user accounts | ||
|
||
Scenario: View users | ||
Given the following users exist: | ||
| first_name | last_name | email | password | password_confirmation | roles | | ||
| Julio | Kulas | julio@test.com | secret | secret | | | ||
| Garret | Schuster | garret@test.com | secret | secret | field_operator | | ||
| Lue | Ankunding | lue@test.com | secret | secret | organization_manager | | ||
| Cassandra | Goodwin | cassandra@test.com | secret | secret | organization_manager field_operator | | ||
| Admin | User | admin@test.com | secret | secret | admin | | ||
And I sign in as "admin@test.com/secret" | ||
And I go to the admin users page | ||
Then I should see "Users" within "h1" | ||
And I should see "Organizations" within "#right-menu" | ||
And I should see "Projects" within "#right-menu" | ||
And I should see "Users" within "#right-menu" | ||
And I should see "Users" tab ".selected" within "#right-menu" | ||
And I should see the following users table: | ||
| User Name | Field Operator | Orphanage Manager | Site Administrator | | ||
| Lue Ankunding | Disabled | Enabled | Disabled | | ||
| Cassandra Goodwin | Enabled | Enabled | Disabled | | ||
| Julio Kulas | Disabled | Disabled | Disabled | | ||
| Garret Schuster | Enabled | Disabled | Disabled | | ||
| Admin User | Disabled | Disabled | Enabled | | ||
And I should see "Created" column following the format "[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}" | ||
|
||
Scenario: Anonymous user attempts to view users | ||
Given I go to the admin users page | ||
Then I should see "Access Denied" within "h1" | ||
And I follow "sign in" | ||
Then I should see "Sign in" within "h2" | ||
|
||
Scenario: Field operator user attempts to view admin users page | ||
Given the following user exists: | ||
| first_name | last_name | email | password | password_confirmation | roles | | ||
| Garret | Schuster | garret@test.com | secret | secret | field_operator | | ||
And I sign in as "garret@test.com/secret" | ||
And I go to the admin users page | ||
Then I should see "Access Denied" within "h1" | ||
And I follow "sign out" | ||
Then I should see "Signed out." | ||
|
||
Scenario: Organziation manager user attempts to view admin users page | ||
Given the following user exists: | ||
| first_name | last_name | email | password | password_confirmation | roles | | ||
| Lue | Ankunding | lue@test.com | secret | secret | organization_manager | | ||
And I sign in as "lue@test.com/secret" | ||
And I go to the admin users page | ||
Then I should see "Access Denied" within "h1" | ||
And I follow "sign out" | ||
Then I should see "Signed out." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.