Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (63 sloc) 3.335 kB
Feature: Department Facet Mappings
Scenario: A person who isn't logged in should get an error message
Given I am on the department facet mappings page
Then I should see "You must be logged in to manage department facet mappings."
Scenario: A non-superuser should not see the option to edit department facets in the menu
Given I am logged in as "weirdlo"
And I am on the add your work page
Then I should not see the user menu option "Edit Department Facets"
Scenario: A superuser should see the option to edit department facets in the menu
Given I am a superuser
And I am on the add your work page
Then I should see the user menu option "Edit Department Facets"
Scenario: A person who can't be a superuser should get an error message
Given I am logged in as "bozo"
And I am on the department facet mappings page
Then I should see "You must be a superuser to manage department facet mappings."
Scenario: A superuser should see the index page
Given I am a superuser
And I am on the department facet mappings page
Then I should see "Department Facet Mappings"
Scenario: On create page, cancel button should take user back to department facet mapping page
Given I am a superuser
And I am on the department facet mappings page
And I press "Add a Mapping"
And I follow "Cancel"
Then I should see "Department Facet Mappings"
Scenario: On create page, display error if no department facet or department display facet is supplied
Given I am a superuser
And I am on the department facet mappings page
And I press "Add a Mapping"
And I press "Create"
Then I should see "Department facet can't be blank"
And I should see "Department display facet can't be blank"
Scenario: User should see feedback on successful submission
Given I am a superuser
And I am on the department facet mappings page
And I press "Add a Mapping"
And I fill in "department_facet_mapping_department_facet" with "Computer Science"
And I fill in "department_facet_mapping_department_display_facet" with "Department of Computer Science"
And I press "Create"
Then I should see "Facet mapping successfully created"
Scenario: Validate uniqueness of department facet
Given I am a superuser
And I am on the department facet mappings page
And I press "Add a Mapping"
And I fill in "department_facet_mapping_department_facet" with "Computer Science"
And I fill in "department_facet_mapping_department_display_facet" with "Department of Computer Science"
And I press "Create"
And I press "Add a Mapping"
And I fill in "department_facet_mapping_department_facet" with "Computer Science"
And I fill in "department_facet_mapping_department_display_facet" with "Department of Computer Science"
And I press "Create"
Then I should see "Department facet has already been taken"
Scenario: Delete a department facet mapping
Given I am a superuser
And I am on the department facet mappings page
And I press "Add a Mapping"
And I fill in "department_facet_mapping_department_facet" with "Computer Science"
And I fill in "department_facet_mapping_department_display_facet" with "Department of Computer Science"
And I press "Create"
Then I should see "Department of Computer Science"
And I press "Remove"
Then I should not see "Department of Computer Science"
Jump to Line
Something went wrong with that request. Please try again.