|
56 | 56 | context "cutoff date banner" do |
57 | 57 | let(:cutoff_date) { Date.new(2026, 4, 20) } |
58 | 58 |
|
59 | | - context "when today is after the cutoff date" do |
60 | | - around { |example| travel_to(cutoff_date + 1.day) { example.run } } |
| 59 | + context "when today is more than 2 days after the cutoff date" do |
| 60 | + around { |example| travel_to(cutoff_date + 3.days) { example.run } } |
61 | 61 |
|
62 | 62 | scenario "banner is not shown" do |
63 | 63 | given_mavis_logins_are_configured( |
|
69 | 69 | end |
70 | 70 | end |
71 | 71 |
|
| 72 | + context "when today is within 2 days after the cutoff date" do |
| 73 | + around { |example| travel_to(cutoff_date + 2.days) { example.run } } |
| 74 | + |
| 75 | + scenario "banner is shown" do |
| 76 | + given_mavis_logins_are_configured( |
| 77 | + national_reporting_cut_off_date: cutoff_date |
| 78 | + ) |
| 79 | + given_i_am_signed_in_as_a_national_reporting_user |
| 80 | + when_i_navigate_to_the_upload_page |
| 81 | + expect(page).to have_css(".nhsuk-notification-banner") |
| 82 | + expect(page).to have_content( |
| 83 | + "Mavis national reporting replaces NIVS on 20 April 2026" |
| 84 | + ) |
| 85 | + end |
| 86 | + end |
| 87 | + |
72 | 88 | context "when today is before the cutoff date" do |
73 | 89 | around { |example| travel_to(cutoff_date - 1.day) { example.run } } |
74 | 90 |
|
|
100 | 116 | ) |
101 | 117 | expect(page).to have_content("Vaccinations given before 20 April 2026") |
102 | 118 | expect(page).to have_content( |
103 | | - "Upload to NIVS by 20 April 2026. After this, NIVS will no longer be available." |
| 119 | + "Upload to NIVS by 22 April 2026. After this, NIVS will no longer be available." |
104 | 120 | ) |
105 | 121 | expect(page).to have_content( |
106 | 122 | "Vaccinations given on or after 20 April 2026" |
|
0 commit comments