Skip to content

Commit

Permalink
Add test to check that image viewer is rendered on the exhibits show …
Browse files Browse the repository at this point in the history
…page
  • Loading branch information
corylown committed Jul 19, 2024
1 parent ec99378 commit 3e995bc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions spec/features/catalog_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe 'Catalog', type: :feature do
RSpec.describe 'Catalog', type: :feature do
let(:exhibit) { FactoryBot.create(:exhibit) }

describe 'admin' do
Expand All @@ -25,6 +25,11 @@
visit spotlight.search_exhibit_catalog_path(exhibit)
expect(page).to have_selector '.card-header', text: 'Item visibility'
end

it 'has an edit link' do
visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')
expect(page).to have_link('Edit')
end
end

it 'has breadcrumbs' do
Expand All @@ -41,7 +46,11 @@
end

describe 'viewing the page' do
let(:exhibit) { FactoryBot.create(:exhibit) }
it 'displays the title and image viewer' do
visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')
expect(page).to have_css('h1', text: "L'AMERIQUE")
expect(page).to have_css('.openseadragon-container')
end

it 'has <meta> tags' do
TopHat.current['twitter_card'] = nil
Expand Down

0 comments on commit 3e995bc

Please sign in to comment.