diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index 316238f6c..2b0fa094c 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -1,6 +1,5 @@ class BrowseController < ApplicationController slimmer_template "gem_layout_full_width" - include RecruitmentBannerHelper def index page = MainstreamBrowsePage.find("/browse") diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index d459e8a69..ef27a0590 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -1,6 +1,5 @@ class OrganisationsController < ApplicationController skip_before_action :set_expiry - include RecruitmentBannerHelper before_action do set_expiry content_item.max_age, public_cache: content_item.public_cache end diff --git a/app/views/browse/show.html.erb b/app/views/browse/show.html.erb index 88fade574..4031ffb37 100644 --- a/app/views/browse/show.html.erb +++ b/app/views/browse/show.html.erb @@ -1,4 +1,5 @@ <% add_view_stylesheet("browse") %> + <% content_for :title, page.title %> <%= render 'shared/tag_meta', tag: page %> @@ -30,8 +31,6 @@ } %> <% end %> -<%= render partial: 'shared/intervention_banner' %> - <% if display_action_links_for_slug?(page.slug) %>
diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index a9ea79948..13cf84238 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -2,7 +2,6 @@ <%= render partial: 'meta', locals: { organisation: @organisation } %> <%= render partial: 'breadcrumb' %> -<%= render partial: 'shared/intervention_banner' %> <%= render partial: 'header' %> <%= render 'govuk_publishing_components/components/machine_readable_metadata', schema: :organisation, diff --git a/lib/data/recruitment_banners.yml b/lib/data/recruitment_banners.yml index b739ec287..1cff13a8d 100644 --- a/lib/data/recruitment_banners.yml +++ b/lib/data/recruitment_banners.yml @@ -9,10 +9,3 @@ # - /foreign-travel-advice banners: -- name: DWP user research banner - suggestion_text: Help improve GOV.UK - suggestion_link_text: Take part in user research (opens in a new tab) - survey_url: https://forms.office.com/e/CkfCRwdLQj - page_paths: - - /government/organisations/department-for-work-pensions - - /browse/benefits diff --git a/spec/features/recruitment_banner_spec.rb b/spec/features/recruitment_banner_spec.rb deleted file mode 100644 index 2ff70bad2..000000000 --- a/spec/features/recruitment_banner_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "integration_spec_helper" - -RSpec.feature "Research panel banner" do - include SearchApiHelpers - include OrganisationHelpers - include RecruitmentBannerHelper - - scenario "browse pages where we want to display Brand User Research banner" do - base_path = "/browse/benefits" - schema = GovukSchemas::Example.find("mainstream_browse_page", example_name: "level_2_page") - schema["base_path"] = base_path - stub_content_store_has_item(schema["base_path"], schema) - search_api_has_documents_for_browse_page(schema["content_id"], [base_path], page_size: SearchApiSearch::PAGE_SIZE_TO_GET_EVERYTHING) - - visit schema["base_path"] - - expect(page.status_code).to eq(200) - expect(page).to have_selector(".gem-c-intervention") - end - - scenario "organisation pages where we want to display Brand User Research banner" do - base_path = "/government/organisations/department-for-work-pensions" - schema = GovukSchemas::Example.find("organisation", example_name: "tribunal") - schema["base_path"] = base_path - stub_content_and_search(schema) - - visit schema["base_path"] - - expect(page.status_code).to eq(200) - expect(page).to have_selector(".gem-c-intervention") - end - - scenario "pages where we don't want to display Brand User Research banner" do - schema = GovukSchemas::Example.find("mainstream_browse_page", example_name: "level_2_page") - stub_content_store_has_item(schema["base_path"], schema) - search_api_has_documents_for_browse_page(schema["content_id"], [schema["base_path"]], page_size: SearchApiSearch::PAGE_SIZE_TO_GET_EVERYTHING) - - visit schema["base_path"] - - expect(page.status_code).to eq(200) - expect(page).to_not have_selector(".gem-c-intervention") - end -end