Skip to content

Commit

Permalink
Remove the research banner
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpatrickpatrick committed Oct 26, 2023
1 parent 07d4dbc commit 443ba21
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 56 deletions.
21 changes: 0 additions & 21 deletions app/presenters/content_item/recruitment_banner.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
module ContentItem
module RecruitmentBanner
SURVEY_URL = "https://surveys.publishing.service.gov.uk/s/SNFVW1/".freeze
SURVEY_URL_MAPPINGS = {
"/log-in-register-hmrc-online-services" => SURVEY_URL,
"/log-in-file-self-assessment-tax-return" => SURVEY_URL,
"/self-assessment-tax-returns" => SURVEY_URL,
"/pay-self-assessment-tax-bill" => SURVEY_URL,
"/contact-hmrc" => SURVEY_URL,
"/log-in-register-hmrc-online-services/register" => SURVEY_URL,
"/dbs-update-service" => SURVEY_URL,
"/government/organisations/hm-revenue-customs/contact/self-assessment" => SURVEY_URL,
}.freeze

BENEFITS_SURVEY_URL = "https://signup.take-part-in-research.service.gov.uk/home?utm_campaign=Content_History&utm_source=Hold_gov_to_account&utm_medium=gov.uk&t=GDS&id=16".freeze
BENEFITS_SURVEY_URL_MAPPINGS = {
"/disability-living-allowance-children" => BENEFITS_SURVEY_URL,
Expand All @@ -31,18 +19,9 @@ module RecruitmentBanner
"/benefits-calculators" => BENEFITS_SURVEY_URL,
}.freeze

def recruitment_survey_url
user_research_test_url
end

def benefits_recruitment_survey_url
key = content_item["base_path"]
BENEFITS_SURVEY_URL_MAPPINGS[key]
end

def user_research_test_url
key = content_item["base_path"]
SURVEY_URL_MAPPINGS[key]
end
end
end
11 changes: 1 addition & 10 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,7 @@
<% end %>
<% end %>

<% if @content_item.recruitment_survey_url %>
<div class="govuk-!-static-margin-top-4">
<%= render "govuk_publishing_components/components/intervention", {
suggestion_text: "Help improve a new GOV.UK tool",
suggestion_link_text: "Sign up to take part in user research",
suggestion_link_url: @content_item.recruitment_survey_url,
new_tab: true,
} %>
</div>
<% elsif @content_item.benefits_recruitment_survey_url %>
<% if @content_item.benefits_recruitment_survey_url %>
<div class="govuk-!-static-margin-top-4">
<%= render "govuk_publishing_components/components/intervention", {
suggestion_text: "Help improve GOV.UK",
Expand Down
25 changes: 0 additions & 25 deletions test/integration/recruitment_banner_test.rb
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
require "test_helper"

class RecruitmentBannerTest < ActionDispatch::IntegrationTest
test "User research banner is displayed on pages of interest" do
guide = GovukSchemas::Example.find("guide", example_name: "guide")

pages_of_interest =
[
"/log-in-register-hmrc-online-services",
"/log-in-file-self-assessment-tax-return",
"/self-assessment-tax-returns",
"/pay-self-assessment-tax-bill",
"/contact-hmrc",
"/log-in-register-hmrc-online-services/register",
"/dbs-update-service",
"/government/organisations/hm-revenue-customs/contact/self-assessment",
]

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?("Sign up to take part in user research", href: "https://surveys.publishing.service.gov.uk/s/SNFVW1/")
end
end

test "Benefits user research banner is displayed on pages of interest" do
guide = GovukSchemas::Example.find("guide", example_name: "guide")

Expand Down

0 comments on commit 443ba21

Please sign in to comment.