From 725884441982c7d98cf6d60a55be09c4b9b57908 Mon Sep 17 00:00:00 2001 From: hannako Date: Wed, 16 Mar 2022 11:56:43 +0000 Subject: [PATCH 1/2] Update survey url --- app/presenters/content_item/recruitment_banner.rb | 2 +- test/integration/recruitment_banner_test.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/presenters/content_item/recruitment_banner.rb b/app/presenters/content_item/recruitment_banner.rb index 592821b4f..44be75c6c 100644 --- a/app/presenters/content_item/recruitment_banner.rb +++ b/app/presenters/content_item/recruitment_banner.rb @@ -1,6 +1,6 @@ module ContentItem module RecruitmentBanner - SURVEY_URL_ONE = "https://GDSUserResearch.optimalworkshop.com/treejack/724268fr-1".freeze + SURVEY_URL_ONE = "https://GDSUserResearch.optimalworkshop.com/treejack/724268fr-1-0".freeze SURVEY_URLS = { "/browse/tax" => SURVEY_URL_ONE, "/browse/business" => SURVEY_URL_ONE, diff --git a/test/integration/recruitment_banner_test.rb b/test/integration/recruitment_banner_test.rb index cd58bca92..efafaee7a 100644 --- a/test/integration/recruitment_banner_test.rb +++ b/test/integration/recruitment_banner_test.rb @@ -16,7 +16,7 @@ class RecruitmentBannerTest < ActionDispatch::IntegrationTest 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/724268fr-1") + assert page.has_link?("Take part in user research (opens in a new tab)", href: "https://GDSUserResearch.optimalworkshop.com/treejack/724268fr-1-0") end test "Recruitment Banner is displayed for any page tagged to Business and Self-employed" do @@ -34,7 +34,7 @@ class RecruitmentBannerTest < ActionDispatch::IntegrationTest 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/724268fr-1") + assert page.has_link?("Take part in user research (opens in a new tab)", href: "https://GDSUserResearch.optimalworkshop.com/treejack/724268fr-1-0") end test "Recruitment Banner is not displayed unless page is tagged to a topic of interest" do @@ -51,6 +51,6 @@ class RecruitmentBannerTest < ActionDispatch::IntegrationTest 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/724268fr-1") + assert_not page.has_link?("Take part in user research", href: "https://GDSUserResearch.optimalworkshop.com/treejack/724268fr-1-0") end end From e74fc4917d67e0a4f78c85b5aa6ab384d0f42f96 Mon Sep 17 00:00:00 2001 From: hannako Date: Wed, 16 Mar 2022 11:57:11 +0000 Subject: [PATCH 2/2] Remove unused helper - this is no longer being used and should have been removed in this commit https://github.com/alphagov/government-frontend/pull/2394/commits/fead04aa627bc50ddd47b74e614a0a631d767bbb --- app/lib/recruitment_helper.rb | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 app/lib/recruitment_helper.rb diff --git a/app/lib/recruitment_helper.rb b/app/lib/recruitment_helper.rb deleted file mode 100644 index b33714765..000000000 --- a/app/lib/recruitment_helper.rb +++ /dev/null @@ -1,7 +0,0 @@ -module RecruitmentHelper - USER_RESEARCH_PAGES = %w[register-for-self-assessment self-employed-records income-tax-rates].freeze - - def self.show_banner?(slug) - USER_RESEARCH_PAGES.include?(slug) - end -end