<%= render 'govuk_publishing_components/components/title',
@@ -32,7 +31,7 @@
<% if @content_item.important_metadata.any? %>
<%= content_tag :div, class: "important-metadata inverse-background responsive-bottom-margin" do %>
<%= render "govuk_publishing_components/components/metadata", {
- inverse: true,
+ inverse: true,
other: @content_item.important_metadata,
margin_bottom: 0,
} %>
diff --git a/app/views/content_items/guide.html.erb b/app/views/content_items/guide.html.erb
index 36be7b1b6..5d7f99420 100644
--- a/app/views/content_items/guide.html.erb
+++ b/app/views/content_items/guide.html.erb
@@ -18,7 +18,6 @@
<% content_for :simple_header, true %>
- <%= render 'shared/intervention_banner' %>
<%= render 'govuk_publishing_components/components/title', { title: @content_item.content_title } %>
<% if @content_item.show_guide_navigation? %>
diff --git a/lib/data/recruitment_banners.yml b/lib/data/recruitment_banners.yml
deleted file mode 100644
index 645afde32..000000000
--- a/lib/data/recruitment_banners.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# Example usage of adding a banner to the banners list:
-
- # - name: Banner 1
- # 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://google.com
- # page_paths:
- # - /
- # - /foreign-travel-advice
-
-banners:
-- name: AI banner 11/11/2024
- 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://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S
- page_paths:
- - /self-assessment-tax-returns
- - /working-for-yourself
- - /self-employed-records
- - /expenses-if-youre-self-employed
- - /first-company-accounts-and-return
- - /what-is-the-construction-industry-scheme
- - /capital-allowances
- - /simpler-income-tax-cash-basis
- - /expenses-and-benefits-a-to-z
- - /capital-gains-tax
- - /directors-loans
- - /self-assessment-tax-return-forms
- - /running-a-limited-company
- - /calculate-tax-on-company-cars
- - /introduction-to-business-rates
- - /calculate-your-business-rates
- - /apply-for-business-rate-relief
- - /stop-being-self-employed
- - /tax-codes
diff --git a/test/integration/recruitment_banner_test.rb b/test/integration/recruitment_banner_test.rb
index 4abf5d87b..88fcb14ce 100644
--- a/test/integration/recruitment_banner_test.rb
+++ b/test/integration/recruitment_banner_test.rb
@@ -24,8 +24,8 @@ class RecruitmentBannerTest < ActionDispatch::IntegrationTest
stub_content_store_has_item(content_item["base_path"], content_item.to_json)
visit content_item["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: "https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S")
+ assert_not page.has_css?(".gem-c-intervention")
+ assert_not page.has_link?("Sign up to take part in user research (opens in a new tab)", href: "https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S")
end
end
@@ -47,8 +47,8 @@ class RecruitmentBannerTest < ActionDispatch::IntegrationTest
stub_content_store_has_item(content_item["base_path"], content_item.to_json)
visit content_item["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: "https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S")
+ assert_not page.has_css?(".gem-c-intervention")
+ assert_not page.has_link?("Sign up to take part in user research (opens in a new tab)", href: "https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S")
end
end
diff --git a/test/unit/helpers/recruitment_banner_helper_test.rb b/test/unit/helpers/recruitment_banner_helper_test.rb
deleted file mode 100644
index 3c261853f..000000000
--- a/test/unit/helpers/recruitment_banner_helper_test.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-require "test_helper"
-
-class RecruitmentBannerHelperTest < ActionView::TestCase
- include RecruitmentBannerHelper
-
- def setup
- @recruitment_banners_data = YAML.load_file(Rails.root.join("test/fixtures/recruitment_banners.yml"))
- end
-
- def request
- OpenStruct.new(path: "/")
- end
-
- def recruitment_banners
- @recruitment_banners_data["banners"]
- end
-
- test "recruitment_banner returns banners that include the current url" do
- actual_banners = recruitment_banner
-
- expected_banners =
- {
- "name" => "Banner 1",
- "suggestion_text" => "Help improve GOV.UK",
- "suggestion_link_text" => "Take part in user research",
- "survey_url" => "https://google.com",
- "page_paths" => ["/"],
- }
- assert_equal expected_banners, actual_banners
- end
-
- test "recruitment_banners yaml structure is valid" do
- @recruitment_banners_data = YAML.load_file(Rails.root.join("lib/data/recruitment_banners.yml"))
-
- if @recruitment_banners_data["banners"].present?
- recruitment_banners.each do |banner|
- assert banner.key?("suggestion_text"), "Banner is missing 'suggestion_text' key"
- assert_not banner["suggestion_text"].blank?, "'suggestion_text' key should not be blank"
-
- assert banner.key?("suggestion_link_text"), "Banner is missing 'suggestion_link_text' key"
- assert_not banner["suggestion_link_text"].blank?, "'suggestion_link_text' key should not be blank"
-
- assert banner.key?("survey_url"), "Banner is missing 'survey_url' key"
- assert_not banner["survey_url"].blank?, "'survey_url' key should not be blank"
-
- assert banner.key?("page_paths"), "Banner is missing 'page_paths' key"
- assert_not banner["page_paths"].blank?, "'page_paths' key should not be blank"
- end
- end
- end
-end