diff --git a/app/assets/stylesheets/components/_banner.scss b/app/assets/stylesheets/components/_banner.scss index 5349b2e4c..55c773b78 100644 --- a/app/assets/stylesheets/components/_banner.scss +++ b/app/assets/stylesheets/components/_banner.scss @@ -34,7 +34,3 @@ max-width: 30em; padding-top: govuk-spacing(2); } - -.gem-c-intervention { - margin-top: govuk-spacing(4); -} diff --git a/app/presenters/content_item/recruitment_banner.rb b/app/presenters/content_item/recruitment_banner.rb deleted file mode 100644 index d6e90d3f6..000000000 --- a/app/presenters/content_item/recruitment_banner.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ContentItem - module RecruitmentBanner - VISA_TEST_URL = "https://surveys.publishing.service.gov.uk/s/0DZCPX/".freeze - VISA_TEST_MAPPINGS = { - "/apply-to-come-to-the-uk" => VISA_TEST_URL, - "/healthcare-immigration-application" => VISA_TEST_URL, - "/tb-test-visa" => VISA_TEST_URL, - "/faster-decision-visa-settlement" => VISA_TEST_URL, - "/skilled-worker-visa" => VISA_TEST_URL, - "/health-care-worker-visa" => VISA_TEST_URL, - "/temporary-worker-charity-worker-visa" => VISA_TEST_URL, - "/seasonal-worker-visa" => VISA_TEST_URL, - "/graduate-visa" => VISA_TEST_URL, - "/uk-family-visa" => VISA_TEST_URL, - "/find-a-visa-application-centre" => VISA_TEST_URL, - "/guidance/visa-decision-waiting-times-applications-outside-the-uk" => VISA_TEST_URL, - "/government/publications/skilled-worker-visa-shortage-occupations/skilled-worker-visa-shortage-occupations" => VISA_TEST_URL, - }.freeze - - def recruitment_survey_url - visa_test_url - end - - def visa_test_url - key = content_item["base_path"] - VISA_TEST_MAPPINGS[key] - end - end -end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 4ec82771d..51b96526a 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -2,7 +2,6 @@ class ContentItemPresenter include ContentItem::Withdrawable include ContentItem::BrexitTaxons include ContentItem::SinglePageNotificationButton - include ContentItem::RecruitmentBanner attr_reader :content_item, :requested_path, :view_context, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1cea2bfe0..8365fdb16 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -31,14 +31,7 @@
- <% if @content_item.recruitment_survey_url %> - <%= render "govuk_publishing_components/components/intervention", { - suggestion_text: "Help improve GOV.UK", - suggestion_link_text: "Take part in user research", - suggestion_link_url: @content_item.recruitment_survey_url, - new_tab: true, - } %> - <% elsif @content_item.show_phase_banner? %> + <% if @content_item.show_phase_banner? %> <%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %> <% end %> diff --git a/test/integration/recruitment_banner_test.rb b/test/integration/recruitment_banner_test.rb deleted file mode 100644 index 867eecfc7..000000000 --- a/test/integration/recruitment_banner_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "test_helper" - -class RecruitmentBannerTest < ActionDispatch::IntegrationTest - test "Visa test recruitment banner is displayed on pages of interest" do - guide = GovukSchemas::Example.find("guide", example_name: "guide") - - pages_of_interest = - [ - "/apply-to-come-to-the-uk", - "/healthcare-immigration-application", - "/tb-test-visa", - "/faster-decision-visa-settlement", - "/skilled-worker-visa", - "/health-care-worker-visa", - "/temporary-worker-charity-worker-visa", - "/seasonal-worker-visa", - "/graduate-visa", - "/uk-family-visa", - "/find-a-visa-application-centre", - "/guidance/visa-decision-waiting-times-applications-outside-the-uk", - "/government/publications/skilled-worker-visa-shortage-occupations/skilled-worker-visa-shortage-occupations", - ] - - pages_of_interest.each do |path| - guide["base_path"] = path - stub_content_store_has_item(guide["base_path"], guide.to_json) - visit guide["base_path"] - - assert page.has_css?(".gem-c-intervention") - assert page.has_link?("Take part in user research (opens in a new tab)", href: "https://surveys.publishing.service.gov.uk/s/0DZCPX/") - end - end - - test "Visa test recruitment banner is not displayed on all pages" do - guide = GovukSchemas::Example.find("guide", example_name: "guide") - guide["base_path"] = "/nothing-to-see-here" - stub_content_store_has_item(guide["base_path"], guide.to_json) - visit guide["base_path"] - - assert_not page.has_css?(".gem-c-intervention") - assert_not page.has_link?("Take part in user research", href: "https://surveys.publishing.service.gov.uk/s/0DZCPX/") - end -end