diff --git a/app/views/catalog/_citation.html.erb b/app/views/catalog/_citation.html.erb index e5f5fbebb0..c6d862b102 100644 --- a/app/views/catalog/_citation.html.erb +++ b/app/views/catalog/_citation.html.erb @@ -1,5 +1,5 @@ <%= render Blacklight::System::ModalComponent.new do |component| %> - <% component.title { t('blacklight.tools.citation') } %> + <% component.with_title { t('blacklight.tools.citation') } %> <%= render Blacklight::Document::CitationComponent.with_collection(@documents) if @documents.present? %> <% end %> diff --git a/app/views/catalog/email.html.erb b/app/views/catalog/email.html.erb index 89e5bda5fd..496295829e 100644 --- a/app/views/catalog/email.html.erb +++ b/app/views/catalog/email.html.erb @@ -1,7 +1,7 @@ <%= render Blacklight::System::ModalComponent.new do |component| %> - <% component.title { t('blacklight.email.form.title') } %> + <% component.with_title { t('blacklight.email.form.title') } %> - <% component.body do %> + <% component.with_body do %> <%= render 'email_form' %> <% end %> <% end %> diff --git a/app/views/catalog/sms.html.erb b/app/views/catalog/sms.html.erb index 8ad9c8e96c..685ab78f2e 100644 --- a/app/views/catalog/sms.html.erb +++ b/app/views/catalog/sms.html.erb @@ -1,7 +1,7 @@ <%= render Blacklight::System::ModalComponent.new do |component| %> - <% component.title { t('blacklight.sms.form.title') } %> + <% component.with_title { t('blacklight.sms.form.title') } %> - <% component.body do %> + <% component.with_body do %> <%= render 'sms_form' %> <% end %> <% end %> diff --git a/spec/features/tools_spec.rb b/spec/features/tools_spec.rb new file mode 100644 index 0000000000..5159ffbb4d --- /dev/null +++ b/spec/features/tools_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +RSpec.describe 'Tools' do + before { visit solr_document_path('2007020969') } + + it 'displays SMS modal with form' do + click_link 'SMS' + expect(find('div.modal-header')).to have_text 'SMS This' + expect(page).to have_selector('form#sms_form') + end + + it 'displays the Cite modal with expected header' do + click_link 'Cite' + expect(find('div.modal-header')).to have_text 'Cite' + end +end