Commit 3a20690 1 parent b23e799 commit 3a20690 Copy full SHA for 3a20690
File tree 2 files changed +23
-0
lines changed
staff_features/digital_objects
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ Feature : Digital Object create Assessment
2
+ Background :
3
+ Given an administrator user is logged in
4
+ And a Digital Object has been created
5
+ And the Digital Object is opened in edit mode
6
+ Scenario : Assessment form is prefilled with Digital Object title
7
+ When the user clicks on 'More'
8
+ And the user clicks on 'Create Assessment'
9
+ Then the New Assessment page is displayed
10
+ And the Assessment is linked to the Digital Object in the 'Basic Information' form
Original file line number Diff line number Diff line change 157
157
expect ( current_url ) . to eq "#{ PUBLIC_URL } /repositories/#{ @repository_id } /digital_objects/#{ @digital_object_id } "
158
158
expect ( page ) . to have_text "Digital Object Title #{ @uuid } "
159
159
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
You can’t perform that action at this time.
0 commit comments