From 7cbbbb519bfc63450eb044586ccc6902ea867c9a Mon Sep 17 00:00:00 2001 From: Collin Brittle Date: Wed, 14 Feb 2024 18:36:47 -0500 Subject: [PATCH] Removes the contact form The new contact form is located on the Libraries' website. --- app/views/hyrax/contact_form/new.html.erb | 22 ------------------- config/routes.rb | 2 ++ spec/requests/contact_spec.rb | 10 +++++++++ spec/system/contact_form_spec.rb | 10 --------- .../hyrax/contact_form/new.html.erb_spec.rb | 15 ------------- 5 files changed, 12 insertions(+), 47 deletions(-) delete mode 100644 app/views/hyrax/contact_form/new.html.erb create mode 100644 spec/requests/contact_spec.rb delete mode 100644 spec/system/contact_form_spec.rb delete mode 100644 spec/views/hyrax/contact_form/new.html.erb_spec.rb diff --git a/app/views/hyrax/contact_form/new.html.erb b/app/views/hyrax/contact_form/new.html.erb deleted file mode 100644 index 34a1cbe89..000000000 --- a/app/views/hyrax/contact_form/new.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%# This file is copied over from Hyrax-2.3.3 %> - - -

- <%= t('hyrax.contact_form.header') %> -

- -
-

Most general questions about submission will be answered on our instructions page.

-

Check the FAQ for common problems.

-

For general questions about submitting your thesis or dissertation, including formatting and paperwork requirements, contact your school's administrator or ADAP.

-

For problems creating a PDF, consult the technology support staff in Emory Center for Digital Scholarship (located on the 3rd floor of Woodruff Library), MediaLab, Student Technology Support (located on the 1st floor of Woodruff Library), or your department.

-

For problems with the ETD submission software, please submit your questions using the form below:

-
- -<%# Hyrax contact form is overwritten here by the existing libwizard form %> -
- \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 5b928475e..433eee4f6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ Rails.application.routes.draw do mount Blacklight::Engine => '/' + get '/contact', to: redirect('https://libraries.emory.edu/research/open-access-publishing/emory-repositories-policy/etd/contact') + concern :searchable, Blacklight::Routes::Searchable.new resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do diff --git a/spec/requests/contact_spec.rb b/spec/requests/contact_spec.rb new file mode 100644 index 000000000..c7193e951 --- /dev/null +++ b/spec/requests/contact_spec.rb @@ -0,0 +1,10 @@ +require 'rails_helper' + +RSpec.describe "ContactForm", type: :request do + describe "GET /contact" do + it "redirects to the new website" do + get '/contact' + expect(response).to redirect_to 'https://libraries.emory.edu/research/open-access-publishing/emory-repositories-policy/etd/contact' + end + end +end diff --git a/spec/system/contact_form_spec.rb b/spec/system/contact_form_spec.rb deleted file mode 100644 index 2497d3312..000000000 --- a/spec/system/contact_form_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -require 'rails_helper' - -RSpec.describe 'contact form page', integration: true, smoke_test: true, type: :system do - scenario 'contact form creation from libwizard', js: true do - visit "/contact" - - expect(page.html).to match(/iframe/) - end -end diff --git a/spec/views/hyrax/contact_form/new.html.erb_spec.rb b/spec/views/hyrax/contact_form/new.html.erb_spec.rb deleted file mode 100644 index 149f37288..000000000 --- a/spec/views/hyrax/contact_form/new.html.erb_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -# NOTE: This spec tests the page linked from "ETD Help" in the application footer -# (the "Contact Us" link in the footer connects out to a general SCO help page) -# This spec tests that we are overriding the default Hyrax contact page, -# For speed and isolation reasons, this test does not attempt to run the remote -# javascript from libwizard or validate the remote script's results -RSpec.describe 'hyrax/contact_form/new.html.erb', type: :view do - it 'overrides the default Hyrax page' do - render - # the replacement page should have instructions and a script that loads a form from libwizard - expect(rendered).to have_css('div.instructions') - expect(rendered).to match('src="//emory.libwizard.com/form_loader.php') - end -end