4
4
before { given_i_am_signed_in }
5
5
6
6
scenario "User creates a Flu campaign" do
7
- given_active_and_discontinued_flu_vaccines_exist
7
+ given_active_flu_vaccines_exist
8
+ and_discontinued_flu_vaccines_exist
8
9
9
10
when_i_go_to_the_campaigns_page
10
11
and_i_click_on_the_new_campaign_button
28
29
29
30
scenario "User edits a Flu campaign" do
30
31
given_a_flu_campaign_exists
32
+ and_discontinued_flu_vaccines_exist
31
33
32
34
when_i_go_to_the_campaigns_page
33
35
and_i_click_on_the_flu_campaign
44
46
and_i_click_continue
45
47
then_i_should_see_the_edit_confirm_page
46
48
49
+ when_i_click_on_change_vaccines
50
+ and_i_select_the_flu_vaccines
51
+ and_i_click_continue
52
+ then_i_should_see_the_edit_confirm_page
53
+
47
54
when_i_confirm_the_campaign
48
55
then_i_should_see_the_campaign_page
49
56
and_i_should_see_the_flu_campaign
50
57
end
51
58
52
59
scenario "User creates an HPV campaign" do
53
- given_active_and_discontinued_hpv_vaccines_exist
60
+ given_active_hpv_vaccines_exist
61
+ and_discontinued_hpv_vaccines_exist
54
62
55
63
when_i_go_to_the_campaigns_page
56
64
and_i_click_on_the_new_campaign_button
74
82
75
83
scenario "User edits an HPV campaign" do
76
84
given_an_hpv_campaign_exists
85
+ and_discontinued_hpv_vaccines_exist
77
86
78
87
when_i_go_to_the_campaigns_page
79
88
and_i_click_on_the_hpv_campaign
90
99
and_i_click_continue
91
100
then_i_should_see_the_edit_confirm_page
92
101
102
+ when_i_click_on_change_vaccines
103
+ and_i_select_the_hpv_vaccines
104
+ and_i_click_continue
105
+ then_i_should_see_the_edit_confirm_page
106
+
93
107
when_i_confirm_the_campaign
94
108
then_i_should_see_the_campaign_page
95
109
and_i_should_see_the_hpv_campaign
@@ -100,13 +114,21 @@ def given_i_am_signed_in
100
114
sign_in @team . users . first
101
115
end
102
116
103
- def given_active_and_discontinued_flu_vaccines_exist
117
+ def given_active_flu_vaccines_exist
104
118
create ( :vaccine , :adjuvanted_quadrivalent )
119
+ end
120
+
121
+ def and_discontinued_flu_vaccines_exist
105
122
create ( :vaccine , :fluad_tetra )
123
+ create ( :vaccine , :flucelvax_tetra )
106
124
end
107
125
108
- def given_active_and_discontinued_hpv_vaccines_exist
126
+ def given_active_hpv_vaccines_exist
109
127
create ( :vaccine , :gardasil_9 )
128
+ end
129
+
130
+ def and_discontinued_hpv_vaccines_exist
131
+ create ( :vaccine , :cervarix )
110
132
create ( :vaccine , :gardasil )
111
133
end
112
134
@@ -241,4 +263,18 @@ def when_i_click_on_change_name
241
263
def when_i_click_on_change_start_date
242
264
within ( ".nhsuk-summary-list__row" , text : "Start date" ) { click_on "Change" }
243
265
end
266
+
267
+ def when_i_click_on_change_vaccines
268
+ within ( ".nhsuk-summary-list__row" , text : "Vaccines" ) { click_on "Change" }
269
+ end
270
+
271
+ def and_i_select_the_flu_vaccines
272
+ check "Fluad Tetra - aQIV"
273
+ check "Flucelvax Tetra - QIVc"
274
+ end
275
+
276
+ def and_i_select_the_hpv_vaccines
277
+ check "Cervarix"
278
+ check "Gardasil"
279
+ end
244
280
end
0 commit comments