|
56 | 56 | context "cutoff date banner" do |
57 | 57 | let(:cutoff_date) { Date.new(2026, 4, 20) } |
58 | 58 |
|
59 | | - context "when today is not the cutoff date" do |
60 | | - around { |example| travel_to(cutoff_date - 1.day) { example.run } } |
| 59 | + context "when today is after the cutoff date" do |
| 60 | + around { |example| travel_to(cutoff_date + 1.day) { 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 before the cutoff date" do |
| 73 | + around { |example| travel_to(cutoff_date - 1.day) { 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 the cutoff date" do |
73 | 89 | around { |example| travel_to(cutoff_date) { example.run } } |
74 | 90 |
|
|
79 | 95 | given_i_am_signed_in_as_a_national_reporting_user |
80 | 96 | when_i_navigate_to_the_upload_page |
81 | 97 | expect(page).to have_css(".nhsuk-notification-banner") |
82 | | - expect(page).to have_content("20 April 2026") |
83 | | - expect(page).to have_content("Check where to upload records") |
84 | 98 | expect(page).to have_content( |
85 | | - "before 20 April 2026 must be uploaded to NIVS by the end of today" |
| 99 | + "Mavis national reporting replaces NIVS on 20 April 2026" |
| 100 | + ) |
| 101 | + expect(page).to have_content("Vaccinations given before 20 April 2026") |
| 102 | + expect(page).to have_content( |
| 103 | + "Upload to NIVS by 20 April 2026. After this, NIVS will no longer be available." |
86 | 104 | ) |
87 | 105 | expect(page).to have_content( |
88 | | - "on or after 20 April 2026 must be uploaded to Mavis national reporting only" |
| 106 | + "Vaccinations given on or after 20 April 2026" |
89 | 107 | ) |
| 108 | + expect(page).to have_content("Upload to Mavis national reporting only.") |
90 | 109 | end |
91 | 110 | end |
92 | 111 | end |
|
0 commit comments