diff --git a/staff_features/accessions/accession_create.feature b/staff_features/accessions/accession_create.feature index 8dec0722..9e65a39e 100644 --- a/staff_features/accessions/accession_create.feature +++ b/staff_features/accessions/accession_create.feature @@ -3,7 +3,7 @@ Feature: Accession Create Given an administrator user is logged in Scenario: Accession is created Given the user is on the New Accession page - When the user fills in Identifier + When the user fills in 'Identifier' And the user clicks on 'Save' Then the 'Accession created' message is displayed Scenario: Accession is not created because required fields are missing diff --git a/staff_features/accessions/accession_delete.feature b/staff_features/accessions/accession_delete.feature index dad7c4a3..a58b5ad4 100644 --- a/staff_features/accessions/accession_delete.feature +++ b/staff_features/accessions/accession_delete.feature @@ -6,7 +6,7 @@ Feature: Accession Delete When the user clicks on 'Browse' And the user clicks on 'Accessions' And the user filters by text with the Accession title - And the user clicks on the checkbox of the Accession + And the user checks the checkbox of the Accession And the user clicks on 'Delete' And the user clicks on 'Delete Records' Then the 'Records deleted' message is displayed diff --git a/staff_features/accessions/accessions_search.feature b/staff_features/accessions/accessions_search.feature index ecb615b4..c45ce985 100644 --- a/staff_features/accessions/accessions_search.feature +++ b/staff_features/accessions/accessions_search.feature @@ -18,4 +18,4 @@ Feature: Accessions Search Given two Accessions have been created with a common keyword in their title When the user filters by text with the common title keyword used by both Accessions And the user clicks on 'Title' - Then the two Accessions are sorted by descending title + Then the two Accessions are displayed sorted by descending title diff --git a/staff_features/accessions/step_definitions/accession_delete.rb b/staff_features/accessions/step_definitions/accession_delete.rb index cc3ea60c..0ccabc77 100644 --- a/staff_features/accessions/step_definitions/accession_delete.rb +++ b/staff_features/accessions/step_definitions/accession_delete.rb @@ -37,7 +37,7 @@ end end -When 'the user clicks on the checkbox of the Accession' do +When 'the user checks the checkbox of the Accession' do find('#multiselect-item').check end diff --git a/staff_features/digital_objects/digital_object_create.feature b/staff_features/digital_objects/digital_object_create.feature index b5650081..0d1b23e0 100644 --- a/staff_features/digital_objects/digital_object_create.feature +++ b/staff_features/digital_objects/digital_object_create.feature @@ -4,7 +4,7 @@ Feature: Digital Object Create Scenario: Digital Object is created Given the user is on the New Digital Object page When the user fills in 'Title' with 'Alabama: Mobile: Government Street [Cochran photos]' - And the user fills in Identifier + And the user fills in 'Identifier' And the user clicks on 'Save' Then the 'Digital Object' created message is displayed Scenario: Digital Object is not created because required fields are missing diff --git a/staff_features/repositories/repository_create.feature b/staff_features/repositories/repository_create.feature index 460d7f8c..8a83da76 100644 --- a/staff_features/repositories/repository_create.feature +++ b/staff_features/repositories/repository_create.feature @@ -4,11 +4,11 @@ Feature: Repository Create When the user clicks on 'System' And the user clicks on 'Manage Repositories' And the user clicks on 'Create Repository' - And the user fills in the Repository Short Name - And the user fills in the Repository Name + And the user fills in 'Repository Short Name' + And the user fills in 'Repository Name' And the user clicks on 'Save' Then the 'Repository Created' message is displayed Scenario: Repository cannot be created from an archivist user Given an archivist user is logged in When the user clicks on 'System' - Then the dropdown menu does not have the Manage Repositories option + Then the 'Manage Repositories' option is not displayed in the dropdown menu diff --git a/staff_features/repositories/repository_create.rb b/staff_features/repositories/repository_create.rb index 02f96b81..f4857435 100644 --- a/staff_features/repositories/repository_create.rb +++ b/staff_features/repositories/repository_create.rb @@ -1,17 +1,5 @@ # frozen_string_literal: true -When 'the user fills in the Repository Short Name' do - @uuid = SecureRandom.uuid - - fill_in 'Repository Short Name', with: "Repository Short Name #{@uuid}" -end - -When 'the user fills in the Repository Name' do - @uuid = SecureRandom.uuid - - fill_in 'Repository Name', with: "Repository Name #{@uuid}" -end - -Then 'the dropdown menu does not have the Manage Repositories option' do - expect(page).to_not have_text 'Manage Repositories' +Then 'the {string} option is not displayed in the dropdown menu' do |string| + expect(page).to_not have_text string end diff --git a/staff_features/shared/step_definitions.rb b/staff_features/shared/step_definitions.rb index 0faaff03..d836f097 100644 --- a/staff_features/shared/step_definitions.rb +++ b/staff_features/shared/step_definitions.rb @@ -18,8 +18,10 @@ end end -When 'the user fills in Identifier' do - fill_in 'Identifier', with: @uuid +When 'the user fills in {string}' do |label| + @uuid = SecureRandom.uuid if @uuid.nil? + + fill_in label, with: @uuid end When 'the user fills in {string} with {string}' do |label, value| diff --git a/staff_features/users/user_create.feature b/staff_features/users/user_create.feature index 3f542a47..e81b5f44 100644 --- a/staff_features/users/user_create.feature +++ b/staff_features/users/user_create.feature @@ -5,10 +5,10 @@ Feature: User Create When the user clicks on 'System' And the user clicks on 'Manage Users' And the user clicks on 'Create User' - And the user fills in the Username - And the user fills in the Full name - And the user fills in the Password - And the user fills in the Confirm password + And the user fills in 'Username' + And the user fills in 'Full name' + And the user fills in 'Password' + And the user fills in 'Confirm password' And the user clicks on 'Create Account' Then the 'User Created' message is displayed Scenario: User is not created because required fields are missing