This repository was archived by the owner on Oct 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
digital_objects/step_definitions Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 204204And 'the user selects the Digital Object Component' do
205205 click_on "Digital Object Component Label #{ @uuid } "
206206end
207+
208+ Then 'the Assessment is linked to the Digital Object in the {string} form' do |form_title |
209+ section_title = find ( 'h3' , text : form_title )
210+ section = section_title . ancestor ( 'section' )
211+ expect ( section [ :id ] ) . to_not eq nil
212+
213+ related_accessions_elements = section . all ( 'li.token-input-token' )
214+
215+ expect ( related_accessions_elements . length ) . to eq 1
216+ related_accession = related_accessions_elements [ 0 ] . find ( '.digital_object' )
217+
218+ expect ( related_accession [ :'data-content' ] ) . to include "digital_objects/#{ @digital_object_id } "
219+ end
Original file line number Diff line number Diff line change 55
66 wait_for_ajax
77end
8+
9+ Given 'the user is on the Subjects page' do
10+ visit "#{ STAFF_URL } /subjects"
11+ end
12+
13+ Then 'the new Subject form has the following default values' do |form_values_table |
14+ visit "#{ STAFF_URL } /subjects/new"
15+
16+ form_values = form_values_table . hashes
17+
18+ form_values . each do |row |
19+ section_title = find ( 'h3' , text : row [ 'form_section' ] )
20+ section = section_title . ancestor ( 'section' )
21+ expect ( section [ :id ] ) . to_not eq nil
22+
23+ within section do
24+ field = find_field ( row [ 'form_field' ] )
25+
26+ expect ( field . value . downcase ) . to eq row [ 'form_value' ] . downcase
27+ end
28+ end
29+ end
Original file line number Diff line number Diff line change 1+ Feature : Subject Edit Default Values
2+ Background :
3+ Given an administrator user is logged in
4+ And the Pre-populate Records option is checked in Repository Preferences
5+ And the user is on the Subjects page
6+ Scenario : Edit Default Values
7+ When the user clicks on 'Edit Default Values'
8+ And the user fills in 'Authority ID' with 'Test ID'
9+ And the user fills in 'Scope Note' with 'Text'
10+ And the user clicks on 'Save'
11+ Then the 'Defaults' updated message is displayed
12+ And the new Subject form has the following default values
13+ | form_section | form_field | form_value |
14+ | Basic Information | Authority ID | Test ID |
15+ | Basic Information | Scope Note | Text |
You can’t perform that action at this time.
0 commit comments