|
36 | 36 | expect(page).to have_content("LocationUnknown") |
37 | 37 | and_had_been_vaccinated_with_mmr |
38 | 38 | and_the_dose_number_is_first |
| 39 | + and_the_performed_at_date_only_is_set |
39 | 40 | and_the_consent_requests_are_sent |
40 | 41 | then_the_parent_doesnt_receive_a_consent_request |
41 | 42 | end |
|
72 | 73 | when_i_choose_mmrv_and_continue |
73 | 74 | then_i_see_the_mmrv_date_page |
74 | 75 |
|
75 | | - when_i_fill_in_the_date_and_continue |
| 76 | + when_i_fill_in_the_date_and_time_and_continue |
76 | 77 | then_i_see_the_confirmation_page |
77 | 78 | and_the_confirmation_summary_is_not_displayed_as_a_warning |
78 | 79 |
|
|
83 | 84 | and_i_see_that_the_reporter_is_set |
84 | 85 | and_had_been_vaccinated_with_mmrv |
85 | 86 | and_the_dose_number_is_second |
| 87 | + and_the_performed_at_date_and_time_are_set |
86 | 88 | and_the_consent_requests_are_sent |
87 | 89 | then_the_parent_doesnt_receive_a_consent_request |
88 | 90 | end |
@@ -207,6 +209,16 @@ def then_i_see_the_mmr_date_instead_of_the_mmr_or_mmrv_page |
207 | 209 | expect(page).to have_content("When was the MMR(V) vaccination given?") |
208 | 210 | end |
209 | 211 |
|
| 212 | + def when_i_fill_in_the_date_and_time_and_continue |
| 213 | + @vaccination_date = 6.months.ago.to_date |
| 214 | + fill_in "Day", with: @vaccination_date.day |
| 215 | + fill_in "Month", with: @vaccination_date.month |
| 216 | + fill_in "Year", with: @vaccination_date.year |
| 217 | + fill_in "Hour", with: "12" |
| 218 | + fill_in "Minute", with: "30" |
| 219 | + click_on "Continue" |
| 220 | + end |
| 221 | + |
210 | 222 | def when_i_fill_in_the_date_and_continue |
211 | 223 | @vaccination_date = 6.months.ago.to_date |
212 | 224 | fill_in "Day", with: @vaccination_date.day |
@@ -281,6 +293,15 @@ def and_the_dose_number_is_second |
281 | 293 | expect(vaccination_record.dose_sequence).to be(2) |
282 | 294 | end |
283 | 295 |
|
| 296 | + def and_the_performed_at_date_and_time_are_set |
| 297 | + expect(page).to have_content("Date#{@vaccination_date.strftime('%-d %B %Y')}") |
| 298 | + expect(page).to have_content("Time12:30") |
| 299 | + end |
| 300 | + |
| 301 | + def and_the_performed_at_date_only_is_set |
| 302 | + expect(page).to have_content("Date#{@vaccination_date.strftime('%-d %B %Y')}") |
| 303 | + end |
| 304 | + |
284 | 305 | def and_the_consent_requests_are_sent |
285 | 306 | EnqueueSchoolConsentRequestsJob.perform_now |
286 | 307 | perform_enqueued_jobs |
|
0 commit comments