|
22 | 22 | then_i_see_the_childs_flu_vaccinations |
23 | 23 | and_i_see_the_childs_flu_sessions |
24 | 24 | and_the_flu_tab_is_selected |
| 25 | + and_i_see_the_activity_log_for_flu |
25 | 26 |
|
26 | 27 | when_i_click_on_the_hpv_tab |
27 | 28 | then_i_see_the_childs_hpv_vaccinations |
28 | 29 | and_i_see_the_childs_hpv_sessions |
29 | 30 | and_the_hpv_tab_is_selected |
| 31 | + and_i_see_the_activity_log_for_hpv |
30 | 32 | end |
31 | 33 |
|
32 | 34 | def given_that_the_child_record_redesign_feature_flag_is_enabled |
@@ -88,13 +90,14 @@ def and_patients_exist |
88 | 90 | end |
89 | 91 |
|
90 | 92 | def and_the_patient_is_vaccinated |
91 | | - create( |
92 | | - :vaccination_record, |
93 | | - outcome: :administered, |
94 | | - patient: @patient, |
95 | | - programme: @hpv, |
96 | | - session: @session |
97 | | - ) |
| 93 | + @vaccination_record = |
| 94 | + create( |
| 95 | + :vaccination_record, |
| 96 | + outcome: :administered, |
| 97 | + patient: @patient, |
| 98 | + programme: @hpv, |
| 99 | + session: @session |
| 100 | + ) |
98 | 101 | end |
99 | 102 |
|
100 | 103 | def when_i_click_on_children |
@@ -181,4 +184,20 @@ def and_i_see_the_childs_hpv_sessions |
181 | 184 | expect(page).to have_content("Vaccinated") |
182 | 185 | end |
183 | 186 | end |
| 187 | + |
| 188 | + def and_i_see_the_activity_log_for_flu |
| 189 | + within(".nhsuk-card", text: "Programme activity") do |
| 190 | + expect(page).to have_content( |
| 191 | + "Added to the session at #{@session.location.name}" |
| 192 | + ) |
| 193 | + end |
| 194 | + end |
| 195 | + |
| 196 | + def and_i_see_the_activity_log_for_hpv |
| 197 | + within(".nhsuk-card", text: "Programme activity") do |
| 198 | + expect(page).to have_content( |
| 199 | + "Vaccinated with #{@vaccination_record.vaccine.brand}" |
| 200 | + ) |
| 201 | + end |
| 202 | + end |
184 | 203 | end |
0 commit comments