@@ -105,6 +105,28 @@ def given_my_team_is_running_an_hpv_vaccination_programme
105
105
106
106
clinic_session . set_notification_dates
107
107
clinic_session . save!
108
+
109
+ patient_already_in_clinic_without_invitiation =
110
+ create ( :patient , year_group : 8 , session : @session )
111
+ create (
112
+ :patient_location ,
113
+ patient : patient_already_in_clinic_without_invitiation ,
114
+ session : clinic_session
115
+ )
116
+
117
+ patient_already_in_clinic_with_invitiation =
118
+ create ( :patient , year_group : 8 , session : @session )
119
+ create (
120
+ :patient_location ,
121
+ patient : patient_already_in_clinic_with_invitiation ,
122
+ session : clinic_session
123
+ )
124
+ create (
125
+ :session_notification ,
126
+ :clinic_initial_invitation ,
127
+ session : clinic_session ,
128
+ patient : patient_already_in_clinic_with_invitiation
129
+ )
108
130
end
109
131
110
132
def and_i_am_signed_in
@@ -153,7 +175,7 @@ def then_i_see_the_school_session
153
175
end
154
176
155
177
def and_i_see_a_child_in_the_cohort
156
- expect ( page ) . to have_content ( "1 child " )
178
+ expect ( page ) . to have_content ( "3 children " )
157
179
end
158
180
159
181
def when_i_click_on_schedule_sessions
@@ -291,15 +313,15 @@ def when_i_click_on_send_invitations
291
313
def then_i_see_the_send_invitations_page
292
314
expect ( page ) . to have_content ( "Invite parents to book a clinic appointment" )
293
315
expect ( page ) . to have_content (
294
- "There is 1 child currently without clinic appointments."
316
+ "There are 2 children currently without clinic appointments."
295
317
)
296
318
end
297
319
298
320
alias_method :and_i_click_on_send_invitations ,
299
321
:when_i_click_on_send_invitations
300
322
301
323
def then_i_see_the_invitation_confirmation
302
- expect ( page ) . to have_content ( "1 child invited to the clinic" )
324
+ expect ( page ) . to have_content ( "2 children invited to the clinic" )
303
325
end
304
326
305
327
def and_the_parent_receives_an_invitation
0 commit comments