Skip to content

Commit 7d134ca

Browse files
Update success messages
1 parent a3c6367 commit 7d134ca

8 files changed

+13
-24
lines changed

staff-features/accessions/accession_create.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Accession Create
55
Given the user is on the New Accession page
66
When the user fills in Identifier
77
And the user clicks on 'Save'
8-
Then the message "Accession created" is displayed
8+
Then the 'Accession created' message is displayed
99
Scenario: Accession is not created
1010
Given the user is on the New Accession page
1111
When the user clicks on 'Save'

staff-features/accessions/accession_delete.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Feature: Accession Delete
77
When the user clicks on the checkbox of the accession
88
And the user clicks on 'Delete'
99
And the user clicks on 'Delete Records'
10-
And the message 'Records deleted' is displayed
11-
And the message 'No records found' is displayed
10+
And the 'Records deleted' message is displayed
11+
And the 'No records found' message is displayed
1212
Scenario: Accession is deleted from the view page
1313
Given an accession has been created
1414
And the user is on the accession details page

staff-features/accessions/step_definitions/accession_create.rb

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
click_on 'Accession'
88
end
99

10-
When 'the user fills in Identifier' do
11-
fill_in 'Identifier', with: @uuid
12-
end
13-
1410
Then('a new accession is created') do
1511
expect(find('h2').text).to eq "Accession #{@uuid} Accession"
1612
expect(find('.alert.alert-success.with-hide-alert').text).to eq 'Accession created'

staff-features/digital-objects/digital_object_create.feature

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Feature: Create Digital Object
33
Given the user is logged in as an administrator
44
Scenario: Digital Object is created
55
Given the user is on the New Digital Object page
6-
When the user fills in Title with a unique id
7-
And the user fills in Identifier with a unique id
6+
When the user fills in 'Title' with 'Alabama: Mobile: Government Street [Cochran photos]'
7+
And the user fills in Identifier
88
And the user clicks on 'Save'
9-
Then the digital object is created
9+
Then the Digital Object created success message is displayed
1010
Scenario: Digital Object is not created because required fields are missing
1111
Given the user is on the New Digital Object page
1212
When the user clicks on 'Save'

staff-features/digital-objects/digital_object_create.rb

+2-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,8 @@
1010
fill_in 'Title', with: "Digital Object Title #{@uuid}"
1111
end
1212

13-
When('the user fills in Identifier with a unique id') do
14-
fill_in 'Identifier', with: @uuid
15-
end
16-
17-
Then('the digital object is created') do
18-
expect(find('h2').text).to eq "Digital Object Title #{@uuid} Digital Object"
19-
expect(find('.alert.alert-success.with-hide-alert').text).to eq "Digital Object Digital Object Title #{@uuid} Created"
20-
21-
expect_record_to_be_in_search_results(@uuid)
13+
Then('the Digital Object created success message is displayed') do
14+
expect(find('.alert.alert-success.with-hide-alert').text).to match /^Digital Object.*Created$/
2215
end
2316

2417
Then ('the digital object is not created') do

staff-features/repositories/repository_create.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: Create repository
77
And the user fills in the Repository Short Name
88
And the user fills in the Repository Name
99
And the user clicks on 'Save'
10-
Then the message 'Repository Created' is displayed
10+
Then the 'Repository Created' message is displayed
1111
And the repository is created
1212
Scenario: Repository is not created from a view-only user
1313
Given the user is logged in as a view-only user

staff-features/shared/step_definitions.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
click_on_string string
4545
end
4646

47-
When 'the user fills in {string} with {string}' do |label, value|
48-
fill_in label, with: value
47+
When 'the user fills in Identifier' do
48+
fill_in 'Identifier', with: @uuid
4949
end
5050

5151
When 'the user fills in {string} with {string}' do |label, value|
@@ -56,7 +56,7 @@
5656
select option, from: label
5757
end
5858

59-
Then 'the message {string} is displayed' do |string|
59+
Then 'the {string} message is displayed' do |string|
6060
expect(page).to have_text string
6161
end
6262

staff-features/users/user_create.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: Create User
99
And the user fills in the Password
1010
And the user fills in the Confirm password
1111
And the user clicks on 'Create Account'
12-
Then the message "User Created" is displayed
12+
Then the 'User Created' message is displayed
1313
And the new user should appear in the search results
1414
Scenario: User is not created because required fields are missing
1515
Given the user is on the Manage Users page

0 commit comments

Comments
 (0)