-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test to check that image viewer is rendered on the exhibits show page #3062
Conversation
spec/features/exhibits_show_spec.rb
Outdated
@@ -0,0 +1,22 @@ | |||
# frozen_string_literal: true | |||
|
|||
describe 'Exhibits show page', type: :feature do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe 'Exhibits show page', type: :feature do | |
RSpec.describe 'Exhibits show page', type: :feature do |
Avoid the need for monkeypatching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me this is the same scenario as is set up in
spotlight/spec/features/catalog_spec.rb
Line 50 in ec99378
visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352') |
864f936
to
3e995bc
Compare
Yes, specs are combined now. Thank you. |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature tests are relatively slow (especially in the setup). Can we include the edit link assertion in the test above? I think the feature is "it draws the page" and there are several assertions that support "the page is drawn correctly".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two admin tests are hitting different routes so I didn't think it made sense to combine them. The test above is for search_exhibit_catalog_path
and the Edit link test I added is for exhibit_solr_document_path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, okay!
Prevent a future regression of the issue reported in #2992 and fixed in #3060