diff --git a/lib/data/recruitment_banners.yml b/lib/data/recruitment_banners.yml index 69ae0e850..76192b13a 100644 --- a/lib/data/recruitment_banners.yml +++ b/lib/data/recruitment_banners.yml @@ -9,72 +9,3 @@ # - /foreign-travel-advice banners: - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_CEST_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=577 - page_paths: - - /guidance/check-employment-status-for-tax - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Corp_Tax_trading_and_non_trading_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=578 - page_paths: - - /guidance/corporation-tax-trading-and-non-trading - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Fill_and_submit_VAT_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=579 - page_paths: - - /guidance/how-to-fill-in-and-submit-your-vat-return-vat-notice-70012 - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Sign_in_BTA_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=580 - page_paths: - - /guidance/sign-in-to-your-hmrc-business-tax-account - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_VAT_on_goods_and_services_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=581 - page_paths: - - /guidance/rates-of-vat-on-different-goods-and-services - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_CIS_refund_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=582 - page_paths: - - /guidance/claim-a-refund-of-construction-industry-scheme-deductions-if-youre-a-limited-company - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_IR35_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=583 - page_paths: - - /guidance/understanding-off-payroll-working-ir35 - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Tax_reliefs_and_allowances_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=584 - page_paths: - - /guidance/tax-reliefs-and-allowances-for-businesses-employers-and-the-self-employed - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Corp_Tax_selling_or_closing_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=585 - page_paths: - - /guidance/corporation-tax-selling-or-closing-your-company - - - name: HMRC Team Banner - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://signup.take-part-in-research.service.gov.uk/?utm_campaign=List_Expect_a_reply_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=586 - page_paths: - - /guidance/check-when-you-can-expect-a-reply-from-hmrc diff --git a/test/integration/recruitment_banner_test.rb b/test/integration/recruitment_banner_test.rb deleted file mode 100644 index 532b79607..000000000 --- a/test/integration/recruitment_banner_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -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") - survey_url = "https://signup.take-part-in-research.service.gov.uk/" - survey_url_mappings = { - "/guidance/check-employment-status-for-tax" => "#{survey_url}?utm_campaign=List_CEST_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=577", - "/guidance/corporation-tax-trading-and-non-trading" => "#{survey_url}?utm_campaign=List_Corp_Tax_trading_and_non_trading_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=578", - "/guidance/how-to-fill-in-and-submit-your-vat-return-vat-notice-70012" => "#{survey_url}?utm_campaign=List_Fill_and_submit_VAT_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=579", - "/guidance/sign-in-to-your-hmrc-business-tax-account" => "#{survey_url}?utm_campaign=List_Sign_in_BTA_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=580", - "/guidance/rates-of-vat-on-different-goods-and-services" => "#{survey_url}?utm_campaign=List_VAT_on_goods_and_services_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=581", - "/guidance/claim-a-refund-of-construction-industry-scheme-deductions-if-youre-a-limited-company" => "#{survey_url}?utm_campaign=List_CIS_refund_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=582", - "/guidance/understanding-off-payroll-working-ir35" => "#{survey_url}?utm_campaign=List_IR35_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=583", - "/guidance/tax-reliefs-and-allowances-for-businesses-employers-and-the-self-employed" => "#{survey_url}?utm_campaign=List_Tax_reliefs_and_allowances_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=584", - "/guidance/corporation-tax-selling-or-closing-your-company" => "#{survey_url}?utm_campaign=List_Corp_Tax_selling_or_closing_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=585", - "/guidance/check-when-you-can-expect-a-reply-from-hmrc" => "#{survey_url}?utm_campaign=List_Expect_a_reply_TAD&utm_source=Other&utm_medium=gov.uk&t=HMRC&id=586", - }.freeze - - pages_of_interest = survey_url_mappings.keys - - 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 (opens in a new tab)", href: survey_url_mappings[path]) - end - end - - test "User research banner is not displayed on all pages" do - guide = GovukSchemas::Example.find("guide", example_name: "guide") - guide["base_path"] = "/nothing-to-see-here" - stub_content_store_has_item(guide["base_path"], guide.to_json) - visit guide["base_path"] - - assert_not page.has_css?(".gem-c-intervention") - assert_not page.has_link?("Sign up to take part in user research", href: "https://gov.uk") - end -end