Skip to content

Commit 9586b7b

Browse files
Digital object create assessment
1 parent ca3b829 commit 9586b7b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

staff_features/digital_objects/digital_object_create_assessment.feature

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ Feature: Digital Object create Assessment
88
And the user clicks on 'Create Assessment'
99
Then the New Assessment page is displayed
1010
And the Assessment is linked to the Digital Object in the 'Basic Information' form
11-

staff_features/digital_objects/step_definitions/digital_object_shared.rb

+13
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,16 @@
157157
expect(current_url).to eq "#{PUBLIC_URL}/repositories/#{@repository_id}/digital_objects/#{@digital_object_id}"
158158
expect(page).to have_text "Digital Object Title #{@uuid}"
159159
end
160+
161+
Then 'the Assessment is linked to the Digital Object in the {string} form' do |form_title|
162+
section_title = find('h3', text: form_title)
163+
section = section_title.ancestor('section')
164+
expect(section[:id]).to_not eq nil
165+
166+
related_accessions_elements = section.all('li.token-input-token')
167+
168+
expect(related_accessions_elements.length).to eq 1
169+
related_accession = related_accessions_elements[0].find('.digital_object')
170+
171+
expect(related_accession[:'data-content']).to include "digital_objects/#{@digital_object_id}"
172+
end

0 commit comments

Comments
 (0)