Skip to content

Commit

Permalink
Set visible: :hidden for hidden elements
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Jan 3, 2023
1 parent 73d06c8 commit c084c8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions spec/features/browsing_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

it 'renders an accessible icon for citing the item' do
visit 'catalog/9934788983506421'
expect(page).to have_selector '.icon-cite[aria-hidden="true"]'
expect(page).to have_selector('.icon-cite[aria-hidden="true"]')
end

it 'renders an accessible icon for sending items to a printer' do
visit 'catalog/9934788983506421'
expect(page).to have_selector '.icon-share[aria-hidden="true"]'
expect(page).to have_selector '.icon-print[aria-hidden="true"]', visible: false
expect(page).to have_selector('.icon-share[aria-hidden="true"]')
expect(page).to have_selector('.icon-print[aria-hidden="true"]', visible: :hidden)
end

context 'when an entry has a bib. ID for a resource published in Figgy', skip: true do
Expand All @@ -25,8 +25,8 @@

it 'updates the thumbnail and constructs an instance of the Universal Viewer' do
using_wait_time 40 do
expect(page).to have_selector 'iframe'
expect(page).to have_selector '.document-thumbnail img[src$="default.jpg"]'
expect(page).to have_selector('iframe')
expect(page).to have_selector('.document-thumbnail img[src$="default.jpg"]')
end
end
end
Expand All @@ -38,14 +38,14 @@

it 'updates the thumbnail and constructs an instance of the Universal Viewer' do
using_wait_time 10 do
expect(page).to have_selector 'iframe'
expect(page).to have_selector '.document-thumbnail img[src$="default.jpg"]'
expect(page).to have_selector('iframe')
expect(page).to have_selector('.document-thumbnail img[src$="default.jpg"]')
end
end

it 'updates the link to the ARK with a fragment identifier for the UV' do
using_wait_time 10 do
expect(page).to have_selector '.availability--online a[href$="7044622#view"]', text: 'Table of contents'
expect(page).to have_selector('.availability--online a[href$="7044622#view"]', text: 'Table of contents')
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/requests/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
visit "/requests/#{mms_id}"
expect(page).to have_content 'Electronic Delivery'
# some weird issue with this and capybara examining the page source shows it is there.
expect(page).to have_selector '#request_user_barcode', visible: false
expect(page).to have_selector '#request_user_barcode', visible: :hidden
choose('requestable__delivery_mode_23558528910006421_print') # chooses 'print' radio button
select('Firestone Library', from: 'requestable__pick_up_23558528910006421')
expect { click_button 'Request this Item' }.to change { ActionMailer::Base.deliveries.count }.by(1)
Expand Down

0 comments on commit c084c8c

Please sign in to comment.