Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test with new id structure
Browse files Browse the repository at this point in the history
lfarrell committed Dec 5, 2023
1 parent 33a952a commit 004cd02
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/features/aeon_web_ead_request_spec.rb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
it 'creates a request link' do
visit solr_document_path 'm0198-xml'

within '#m0198-xmlaspace_ref11_d0s' do
within '#m0198-xmlaspace_ref11_d0s-hierarchy-item' do
click_link 'Pages 1-78'
end
expect(page).to have_css(
12 changes: 6 additions & 6 deletions spec/features/collection_page_spec.rb
Original file line number Diff line number Diff line change
@@ -191,20 +191,20 @@

it 'sub components are viewable and expandable' do
within '#collection-context' do
within '#aoa271aspace_563a320bb37d24a9e1e6f7bf95b52671' do
within '#aoa271aspace_563a320bb37d24a9e1e6f7bf95b52671-hierarchy-item' do
click_link 'View'
within '#aoa271aspace_dc2aaf83625280ae2e193beb3f4aea78.al-collection-context' do
within '#aoa271aspace_dc2aaf83625280ae2e193beb3f4aea78-hierarchy-item.al-collection-context' do
expect(page).to have_link 'Constitution and by-laws'
end
click_link 'Expand'
expect(page).to have_link 'Reports'
el = find_by_id('aoa271aspace_238a0567431f36f49acea49ef576d408')
el = find_by_id('aoa271aspace_238a0567431f36f49acea49ef576d408-hierarchy-item')
evaluate_script "window.scrollTo(0,#{el.rect.y - 100})"
sleep 1
within '#aoa271aspace_238a0567431f36f49acea49ef576d408' do
within '#aoa271aspace_238a0567431f36f49acea49ef576d408-hierarchy-item' do
click_link 'View'
expect(page).to have_link 'Expansion Plan'
within '#aoa271aspace_f934f1add34289f28bd0feb478e68275' do
within '#aoa271aspace_f934f1add34289f28bd0feb478e68275-hierarchy-item' do
click_link 'View'
expect(page).to have_link 'Initial Phase'
expect(page).to have_link 'Phase II: Expansion'
@@ -215,7 +215,7 @@
end

it 'includes the number of direct children of the component' do
within '#aoa271aspace_563a320bb37d24a9e1e6f7bf95b52671' do
within '#aoa271aspace_563a320bb37d24a9e1e6f7bf95b52671-hierarchy-item' do
expect(page).to have_css(
'.al-number-of-children-badge',
text: /25/
4 changes: 2 additions & 2 deletions spec/features/component_page_spec.rb
Original file line number Diff line number Diff line change
@@ -182,7 +182,7 @@

it 'enables expanding nodes outside of own ancestor tree' do
within '#collection-context' do
find('#aoa271aspace_01daa89087641f7fc9dbd7a10d3f2da9 .al-toggle-view-children').click
find('#aoa271aspace_01daa89087641f7fc9dbd7a10d3f2da9-hierarchy-item .al-toggle-view-children').click
expect(page).to have_css '.document-title-heading', text: 'Miscellaneous 1999'
end
end
@@ -202,7 +202,7 @@

it 'expands child nodes when clicked' do
within '#collection-context' do
find('#pc0170-xmlaspace_ref5_edi .al-toggle-view-children').click
find('#pc0170-xmlaspace_ref5_edi-hierarchy-item .al-toggle-view-children').click
expect(page).to have_css '.document-title-heading', text: 'Restricted images, 1979-2000'
end
end

0 comments on commit 004cd02

Please sign in to comment.