|
1 | 1 | require "test_helper"
|
2 | 2 |
|
3 | 3 | class RecruitmentBannerTest < ActionDispatch::IntegrationTest
|
4 |
| - test "HMRC banner 21/10/2024 is displayed on detailed guide of interest" do |
5 |
| - detailed_guide = GovukSchemas::Example.find("detailed_guide", example_name: "detailed_guide") |
6 |
| - |
7 |
| - detailed_guide["base_path"] = "/guidance/keeping-your-hmrc-login-details-safe" |
8 |
| - stub_content_store_has_item(detailed_guide["base_path"], detailed_guide.to_json) |
9 |
| - visit detailed_guide["base_path"] |
10 |
| - |
11 |
| - assert page.has_css?(".gem-c-intervention") |
12 |
| - 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_74GjifgnGv6GsMC?Source=BannerList_HMRC_PAS_TAD") |
13 |
| - end |
14 |
| - |
15 |
| - test "HMRC banner 21/10/2024 is displayed on document collection of interest" do |
16 |
| - document_collection = GovukSchemas::Example.find("document_collection", example_name: "document_collection") |
17 |
| - |
18 |
| - document_collection["base_path"] = "/government/collections/hmrc-phishing-and-scams-detailed-information" |
19 |
| - stub_content_store_has_item(document_collection["base_path"], document_collection.to_json) |
20 |
| - visit document_collection["base_path"] |
21 |
| - |
22 |
| - assert page.has_css?(".gem-c-intervention") |
23 |
| - 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_74GjifgnGv6GsMC?Source=BannerList_HMRC_PAS_TAD") |
24 |
| - end |
25 |
| - |
26 |
| - test "HMRC banner 21/10/2024 is not displayed on all pages" do |
27 |
| - detailed_guide = GovukSchemas::Example.find("detailed_guide", example_name: "detailed_guide") |
28 |
| - detailed_guide["base_path"] = "/nothing-to-see-here" |
29 |
| - stub_content_store_has_item(detailed_guide["base_path"], detailed_guide.to_json) |
30 |
| - visit detailed_guide["base_path"] |
31 |
| - |
32 |
| - assert_not page.has_css?(".gem-c-intervention") |
33 |
| - end |
34 |
| - |
35 | 4 | test "AI banner 11/11/2024 is displayed on guides of interest" do
|
36 | 5 | guide_paths = [
|
37 | 6 | "/self-assessment-tax-returns",
|
|
0 commit comments