2
2
3
3
describe "Tallying" do
4
4
scenario "vaccinator can see how many they have administered during a session" do
5
- given_a_session_exists_for_hpv_and_flu
5
+ given_a_session_for_hpv_and_flu_is_running_today
6
6
and_i_have_administered_two_cervarix_vaccines_for_hpv_programme
7
7
and_administered_one_gardasil_vaccine_for_hpv_programme
8
8
and_administered_one_fluenz_vaccine_for_flu_programme
9
+ and_i_created_vaccination_records_yesterday
9
10
and_vaccinations_are_recorded_by_other_team_members
10
11
and_the_default_vaccine_batches_have_been_set_for_flu_and_hpv
11
12
12
13
when_i_visit_the_session_record_tab
13
14
and_i_click_on_the_expander_your_vaccinations_today
14
- then_i_see_my_vaccinations_in_summary_with_default_batches
15
+ then_i_see_my_vaccination_tallies_for_today_with_default_batches
15
16
end
16
17
17
18
scenario "no vaccinations have been administered yet" do
18
- given_a_session_exists_for_hpv_and_flu
19
+ given_a_session_for_hpv_and_flu_is_running_today
19
20
and_the_default_vaccine_batches_have_been_set_for_flu_and_hpv
20
21
21
22
when_i_visit_the_session_record_tab
22
23
and_i_click_on_the_expander_your_vaccinations_today
23
- then_i_see_my_vaccinations_in_summary_with_all_zero_values_with_default_batches
24
+ then_i_see_my_vaccination_tallies_with_all_zero_values_with_default_batches
24
25
end
25
26
26
- def given_a_session_exists_for_hpv_and_flu
27
+ def given_a_session_for_hpv_and_flu_is_running_today
27
28
@flu_programme = create ( :programme , :flu , vaccines : [ ] )
28
29
@hpv_programme = create ( :programme , :hpv , vaccines : [ ] )
29
30
@@ -124,6 +125,18 @@ def and_administered_one_fluenz_vaccine_for_flu_programme
124
125
)
125
126
end
126
127
128
+ def and_i_created_vaccination_records_yesterday
129
+ create (
130
+ :vaccination_record ,
131
+ batch : @cervarix_batch ,
132
+ vaccine : @cervarix_vaccine ,
133
+ session : @session ,
134
+ programme : @hpv_programme ,
135
+ performed_by : @user ,
136
+ created_at : Time . zone . yesterday
137
+ )
138
+ end
139
+
127
140
def and_vaccinations_are_recorded_by_other_team_members
128
141
create (
129
142
:vaccination_record ,
@@ -134,14 +147,14 @@ def and_vaccinations_are_recorded_by_other_team_members
134
147
)
135
148
end
136
149
137
- def then_i_see_my_vaccinations_in_summary_with_default_batches
150
+ def then_i_see_my_vaccination_tallies_for_today_with_default_batches
138
151
rows = page . all ( ".nhsuk-table__row" )
139
152
expect ( rows [ 1 ] ) . to have_content ( "Cervarix 1 #{ @cervarix_batch . name } Change" )
140
153
expect ( rows [ 2 ] ) . to have_content ( "Gardasil 2 Not set" )
141
154
expect ( rows [ 3 ] ) . to have_content ( "Fluenz 1 #{ @fluenz_batch . name } Change" )
142
155
end
143
156
144
- def then_i_see_my_vaccinations_in_summary_with_all_zero_values_with_default_batches
157
+ def then_i_see_my_vaccination_tallies_with_all_zero_values_with_default_batches
145
158
rows = page . all ( ".nhsuk-table__row" )
146
159
expect ( rows [ 1 ] ) . to have_content ( "Cervarix 0 #{ @cervarix_batch . name } Change" )
147
160
expect ( rows [ 2 ] ) . to have_content ( "Gardasil 0 Not set" )
0 commit comments