Skip to content

Commit

Permalink
Digital object create assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Jan 14, 2025
1 parent 0295586 commit 5f2b450
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Feature: Digital Object create Assessment
And the user clicks on 'Create Assessment'
Then the New Assessment page is displayed
And the Assessment is linked to the Digital Object in the 'Basic Information' form

Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,16 @@

expect(page).to have_field('Identifier', with: "Digital Object Identifier #{@uuid}")
end

Then 'the Assessment is linked to the Digital Object in the {string} form' do |form_title|
section_title = find('h3', text: form_title)
section = section_title.ancestor('section')
expect(section[:id]).to_not eq nil

related_accessions_elements = section.all('li.token-input-token')

expect(related_accessions_elements.length).to eq 1
related_accession = related_accessions_elements[0].find('.digital_object')

expect(related_accession[:'data-content']).to include "digital_objects/#{@digital_object_id}"
end

0 comments on commit 5f2b450

Please sign in to comment.