diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f6ca70e0e..81fa46257 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -22,7 +22,6 @@ $govuk-new-link-styles: true; @import "govuk_publishing_components/components/govspeak-html-publication"; @import "govuk_publishing_components/components/image-card"; @import "govuk_publishing_components/components/inset-text"; -@import "govuk_publishing_components/components/intervention"; @import "govuk_publishing_components/components/inverse-header"; @import "govuk_publishing_components/components/lead-paragraph"; @import "govuk_publishing_components/components/metadata"; 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 b40912fc1..000000000 --- a/app/presenters/content_item/recruitment_banner.rb +++ /dev/null @@ -1,27 +0,0 @@ -module ContentItem - module RecruitmentBanner - SURVEY_URL_ONE = "https://GDSUserResearch.optimalworkshop.com/treejack/3z828uy6".freeze - SURVEY_URLS = { - "/browse/working" => SURVEY_URL_ONE, - }.freeze - - def recruitment_survey_url - key = SURVEY_URLS.keys.find { |k| content_tagged_to(k).present? } - SURVEY_URLS[key] - end - - private - - def mainstream_browse_pages - content_item["links"]["mainstream_browse_pages"] if content_item["links"] - end - - def content_tagged_to(browse_base_path) - return [] unless mainstream_browse_pages - - mainstream_browse_pages.find do |mainstream_browse_page| - mainstream_browse_page["base_path"].starts_with? browse_base_path - end - end - end -end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 9e21ffce6..fd2a68232 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 4760fc59a..6f206e855 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 6082f1ce0..000000000 --- a/test/integration/recruitment_banner_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "test_helper" - -class RecruitmentBannerTest < ActionDispatch::IntegrationTest - test "Recruitment Banner is displayed for any page tagged to Working, jobs and pensions" do - @working_browse_page = { - "content_id" => "123", - "title" => "Self Assessment", - "base_path" => "/browse/working/self-assessment", - } - - guide = GovukSchemas::Example.find("guide", example_name: "guide") - guide["links"]["mainstream_browse_pages"] = [] - guide["links"]["mainstream_browse_pages"] << @working_browse_page - - 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://GDSUserResearch.optimalworkshop.com/treejack/3z828uy6") - end - - test "Recruitment Banner is not displayed unless page is tagged to a topic of interest" do - @not_of_interest = { - "content_id" => "123", - "title" => "I am not interesting", - "base_path" => "/browse/boring", - } - - guide = GovukSchemas::Example.find("guide", example_name: "guide") - guide["links"]["mainstream_browse_pages"] = [] - guide["links"]["mainstream_browse_pages"] << @not_of_interest - stub_content_store_has_item(guide["base_path"], guide.to_json) - visit_with_cachebust guide["base_path"] - - assert_not page.has_css?(".gem-c-intervention") - assert_not page.has_link?("Take part in user research", href: "https://GDSUserResearch.optimalworkshop.com/treejack/3z828uy6") - end -end