diff --git a/app/presenters/content_item/recruitment_banner.rb b/app/presenters/content_item/recruitment_banner.rb deleted file mode 100644 index 52326bedc7..0000000000 --- a/app/presenters/content_item/recruitment_banner.rb +++ /dev/null @@ -1,20 +0,0 @@ -module ContentItem - module RecruitmentBanner - SURVEY_URL = "https://surveys.publishing.service.gov.uk/s/4J4QD4/".freeze - SURVEY_URL_MAPPINGS = { - "/check-national-insurance-record" => SURVEY_URL, - "/check-state-pension" => SURVEY_URL, - "/student-finance-register-login" => SURVEY_URL, - "/sign-in-universal-credit" => SURVEY_URL, - }.freeze - - def recruitment_survey_url - user_research_test_url - end - - def user_research_test_url - key = content_item["base_path"] - SURVEY_URL_MAPPINGS[key] - end - end -end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 255e99c04b..a492bdedc8 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -1,5 +1,4 @@ class ContentItemPresenter - include ContentItem::RecruitmentBanner attr_reader :content_item def initialize(content_item) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f202d69a22..5e05aad968 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,14 +4,7 @@ <%= yield %> <% else %> - <% if publication && publication.recruitment_survey_url %> - <%= render "govuk_publishing_components/components/intervention", { - suggestion_text: "Help improve GOV.UK", - suggestion_link_text: "Take part in user research (opens in a new tab)", - suggestion_link_url: publication.recruitment_survey_url, - new_tab: true, - } %> - <% elsif publication && publication.in_beta %> + <% if publication && publication.in_beta %> <%= render 'govuk_publishing_components/components/phase_banner', phase: "beta", ga4_tracking: true %> <% end %> <% unless current_page?(root_path) || !(publication || @calendar) %> diff --git a/test/integration/recruitment_banner_test.rb b/test/integration/recruitment_banner_test.rb deleted file mode 100644 index 53bd554b51..0000000000 --- a/test/integration/recruitment_banner_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require "integration_test_helper" - -class RecruitmentBannerTest < ActionDispatch::IntegrationTest - test "User research banner is displayed on pages of interest" do - transaction = GovukSchemas::Example.find("transaction", example_name: "transaction") - - pages_of_interest = - [ - "/check-national-insurance-record", - "/check-state-pension", - "/student-finance-register-login", - "/sign-in-universal-credit", - ] - - pages_of_interest.each do |path| - transaction["base_path"] = path - stub_content_store_has_item(transaction["base_path"], transaction.to_json) - visit transaction["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/4J4QD4/") - end - end - - test "User research banner is not displayed on all pages" do - transaction = GovukSchemas::Example.find("transaction", example_name: "transaction") - transaction["base_path"] = "/nothing-to-see-here" - stub_content_store_has_item(transaction["base_path"], transaction.to_json) - visit transaction["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/4J4QD4/") - end -end