Skip to content

Commit 7b6f986

Browse files
authored
Merge pull request #795 from NHSDigital/rename-online-consent-page
Rename online consent page
2 parents 676899a + 5a444f7 commit 7b6f986

16 files changed

+187
-181
lines changed

mavis/test/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
nurse,
4242
nurse_consent_wizard_page,
4343
onboarding,
44-
online_consent_page,
44+
online_consent_wizard_page,
4545
organisation,
4646
prescriber,
4747
programme_children_page,
@@ -127,7 +127,7 @@
127127
"nurse",
128128
"nurse_consent_wizard_page",
129129
"onboarding",
130-
"online_consent_page",
130+
"online_consent_wizard_page",
131131
"organisation",
132132
"prescriber",
133133
"programme_children_page",

mavis/test/fixtures/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
log_out_page,
5656
match_consent_response_page,
5757
nurse_consent_wizard_page,
58-
online_consent_page,
58+
online_consent_wizard_page,
5959
programme_children_page,
6060
programme_overview_page,
6161
programme_sessions_page,
@@ -132,7 +132,7 @@
132132
"nurse",
133133
"nurse_consent_wizard_page",
134134
"onboarding",
135-
"online_consent_page",
135+
"online_consent_wizard_page",
136136
"organisation",
137137
"prescriber",
138138
"programme_children_page",

mavis/test/fixtures/pages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
LogOutPage,
2626
MatchConsentResponsePage,
2727
NurseConsentWizardPage,
28-
OnlineConsentPage,
28+
OnlineConsentWizardPage,
2929
ProgrammeChildrenPage,
3030
ProgrammeOverviewPage,
3131
ProgrammeSessionsPage,
@@ -158,8 +158,8 @@ def match_consent_response_page(page: Page) -> MatchConsentResponsePage:
158158

159159

160160
@pytest.fixture
161-
def online_consent_page(page: Page) -> OnlineConsentPage:
162-
return OnlineConsentPage(page)
161+
def online_consent_wizard_page(page: Page) -> OnlineConsentWizardPage:
162+
return OnlineConsentWizardPage(page)
163163

164164

165165
@pytest.fixture

mavis/test/pages/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .import_records import ImportRecordsWizardPage, ImportsPage
1919
from .log_in import LogInPage, LogOutPage
2020
from .nurse_consent import GillickCompetencePage, NurseConsentWizardPage
21-
from .online_consent import OnlineConsentPage
21+
from .online_consent import OnlineConsentWizardPage
2222
from .programmes import (
2323
ProgrammeChildrenPage,
2424
ProgrammeOverviewPage,
@@ -68,7 +68,7 @@
6868
"LogOutPage",
6969
"MatchConsentResponsePage",
7070
"NurseConsentWizardPage",
71-
"OnlineConsentPage",
71+
"OnlineConsentWizardPage",
7272
"ProgrammeChildrenPage",
7373
"ProgrammeOverviewPage",
7474
"ProgrammeSessionsPage",

mavis/test/pages/online_consent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414

1515

16-
class OnlineConsentPage:
16+
class OnlineConsentWizardPage:
1717
def __init__(self, page: Page) -> None:
1818
self.page = page
1919

tests/test_consent_responses.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def online_consent_url(schedule_session_and_get_consent_url, schools):
2424
def give_online_consent(
2525
page,
2626
start_page,
27-
online_consent_page,
27+
online_consent_wizard_page,
2828
online_consent_url,
2929
children,
3030
schools,
@@ -34,18 +34,18 @@ def give_online_consent(
3434

3535
page.goto(online_consent_url)
3636
start_page.start()
37-
online_consent_page.fill_details(child, child.parents[0], schools)
38-
online_consent_page.agree_to_hpv_vaccination()
39-
online_consent_page.fill_address_details(*child.address)
40-
online_consent_page.answer_health_questions(4, yes_to_health_questions=False)
41-
online_consent_page.click_confirm()
37+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
38+
online_consent_wizard_page.agree_to_hpv_vaccination()
39+
online_consent_wizard_page.fill_address_details(*child.address)
40+
online_consent_wizard_page.answer_health_questions(4, yes_to_health_questions=False)
41+
online_consent_wizard_page.click_confirm()
4242

4343

4444
@pytest.fixture
4545
def give_online_consent_pds_child(
4646
page,
4747
start_page,
48-
online_consent_page,
48+
online_consent_wizard_page,
4949
online_consent_url,
5050
pds_child,
5151
schools,
@@ -55,11 +55,11 @@ def give_online_consent_pds_child(
5555

5656
page.goto(online_consent_url)
5757
start_page.start()
58-
online_consent_page.fill_details(child, child.parents[0], schools)
59-
online_consent_page.agree_to_hpv_vaccination()
60-
online_consent_page.fill_address_details(*child.address)
61-
online_consent_page.answer_health_questions(4, yes_to_health_questions=False)
62-
online_consent_page.click_confirm()
58+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
59+
online_consent_wizard_page.agree_to_hpv_vaccination()
60+
online_consent_wizard_page.fill_address_details(*child.address)
61+
online_consent_wizard_page.answer_health_questions(4, yes_to_health_questions=False)
62+
online_consent_wizard_page.click_confirm()
6363

6464

6565
@pytest.fixture

tests/test_e2e_doubles.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setup_session_for_doubles(setup_session_and_batches_with_fixed_child):
2222
def test_recording_doubles_vaccination_e2e(
2323
doubles_consent_url,
2424
setup_session_for_doubles,
25-
online_consent_page,
25+
online_consent_wizard_page,
2626
sessions_search_page,
2727
sessions_overview_page,
2828
sessions_register_page,
@@ -57,26 +57,26 @@ def test_recording_doubles_vaccination_e2e(
5757
revaxis_batch_name = setup_session_for_doubles[Vaccine.REVAXIS]
5858

5959
number_of_health_questions = (
60-
online_consent_page.get_number_of_health_questions_for_programmes(
60+
online_consent_wizard_page.get_number_of_health_questions_for_programmes(
6161
[Programme.MENACWY, Programme.TD_IPV],
6262
)
6363
)
6464

65-
online_consent_page.go_to_url(doubles_consent_url)
65+
online_consent_wizard_page.go_to_url(doubles_consent_url)
6666
start_page.start()
6767

68-
online_consent_page.fill_details(child, child.parents[0], schools)
69-
online_consent_page.agree_to_doubles_vaccinations(
68+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
69+
online_consent_wizard_page.agree_to_doubles_vaccinations(
7070
Programme.MENACWY,
7171
Programme.TD_IPV,
7272
)
73-
online_consent_page.fill_address_details(*child.address)
74-
online_consent_page.answer_health_questions(
73+
online_consent_wizard_page.fill_address_details(*child.address)
74+
online_consent_wizard_page.answer_health_questions(
7575
number_of_health_questions,
7676
yes_to_health_questions=False,
7777
)
78-
online_consent_page.click_confirm()
79-
online_consent_page.check_final_consent_message(
78+
online_consent_wizard_page.click_confirm()
79+
online_consent_wizard_page.check_final_consent_message(
8080
child,
8181
programmes=[Programme.MENACWY, Programme.TD_IPV],
8282
yes_to_health_questions=False,

tests/test_e2e_flu.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def setup_session_for_flu(setup_session_and_batches_with_fixed_child):
3131
def test_recording_flu_vaccination_e2e(
3232
flu_consent_url,
3333
setup_session_for_flu,
34-
online_consent_page,
34+
online_consent_wizard_page,
3535
sessions_search_page,
3636
sessions_overview_page,
3737
sessions_register_page,
@@ -74,18 +74,20 @@ def test_recording_flu_vaccination_e2e(
7474
else batch_names[Vaccine.FLUENZ]
7575
)
7676

77-
online_consent_page.go_to_url(flu_consent_url)
77+
online_consent_wizard_page.go_to_url(flu_consent_url)
7878
start_page.start()
7979

80-
online_consent_page.fill_details(child, child.parents[0], schools)
81-
online_consent_page.agree_to_flu_vaccination(consent_option=consent_option)
82-
online_consent_page.fill_address_details(*child.address)
83-
online_consent_page.answer_health_questions(
84-
online_consent_page.get_number_of_health_questions_for_flu(consent_option),
80+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
81+
online_consent_wizard_page.agree_to_flu_vaccination(consent_option=consent_option)
82+
online_consent_wizard_page.fill_address_details(*child.address)
83+
online_consent_wizard_page.answer_health_questions(
84+
online_consent_wizard_page.get_number_of_health_questions_for_flu(
85+
consent_option
86+
),
8587
yes_to_health_questions=False,
8688
)
87-
online_consent_page.click_confirm()
88-
online_consent_page.check_final_consent_message(
89+
online_consent_wizard_page.click_confirm()
90+
online_consent_wizard_page.check_final_consent_message(
8991
child,
9092
programmes=[Programme.FLU],
9193
yes_to_health_questions=False,

tests/test_e2e_hpv.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setup_session_for_hpv(setup_session_and_batches_with_fixed_child):
2020
def test_recording_hpv_vaccination_e2e(
2121
hpv_consent_url,
2222
setup_session_for_hpv,
23-
online_consent_page,
23+
online_consent_wizard_page,
2424
sessions_search_page,
2525
sessions_overview_page,
2626
sessions_register_page,
@@ -53,18 +53,18 @@ def test_recording_hpv_vaccination_e2e(
5353
gardasil_9_batch_name = setup_session_for_hpv[Vaccine.GARDASIL_9]
5454
number_of_health_questions = len(Programme.health_questions(Programme.HPV))
5555

56-
online_consent_page.go_to_url(hpv_consent_url)
56+
online_consent_wizard_page.go_to_url(hpv_consent_url)
5757
start_page.start()
5858

59-
online_consent_page.fill_details(child, child.parents[0], schools)
60-
online_consent_page.agree_to_hpv_vaccination()
61-
online_consent_page.fill_address_details(*child.address)
62-
online_consent_page.answer_health_questions(
59+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
60+
online_consent_wizard_page.agree_to_hpv_vaccination()
61+
online_consent_wizard_page.fill_address_details(*child.address)
62+
online_consent_wizard_page.answer_health_questions(
6363
number_of_health_questions,
6464
yes_to_health_questions=False,
6565
)
66-
online_consent_page.click_confirm()
67-
online_consent_page.check_final_consent_message(
66+
online_consent_wizard_page.click_confirm()
67+
online_consent_wizard_page.check_final_consent_message(
6868
child,
6969
programmes=[Programme.HPV],
7070
yes_to_health_questions=False,

tests/test_e2e_mmr.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def setup_session_for_mmr(setup_session_and_batches_with_fixed_child):
2121
def test_recording_mmr_vaccination_e2e_with_triage(
2222
url_with_mmr_session_scheduled,
2323
setup_session_for_mmr,
24-
online_consent_page,
24+
online_consent_wizard_page,
2525
sessions_search_page,
2626
sessions_overview_page,
2727
sessions_register_page,
@@ -57,18 +57,18 @@ def test_recording_mmr_vaccination_e2e_with_triage(
5757
Programme.health_questions(Programme.MMR, ConsentOption.MMR_EITHER)
5858
)
5959

60-
online_consent_page.go_to_url(url_with_mmr_session_scheduled)
60+
online_consent_wizard_page.go_to_url(url_with_mmr_session_scheduled)
6161
start_page.start()
6262

63-
online_consent_page.fill_details(child, child.parents[0], schools)
64-
online_consent_page.agree_to_mmr_vaccination(ConsentOption.MMR_EITHER)
65-
online_consent_page.fill_address_details(*child.address)
66-
online_consent_page.answer_health_questions(
63+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
64+
online_consent_wizard_page.agree_to_mmr_vaccination(ConsentOption.MMR_EITHER)
65+
online_consent_wizard_page.fill_address_details(*child.address)
66+
online_consent_wizard_page.answer_health_questions(
6767
number_of_health_questions,
6868
yes_to_health_questions=True,
6969
)
70-
online_consent_page.click_confirm()
71-
online_consent_page.check_final_consent_message(
70+
online_consent_wizard_page.click_confirm()
71+
online_consent_wizard_page.check_final_consent_message(
7272
child,
7373
programmes=[Programme.MMR],
7474
yes_to_health_questions=True,
@@ -106,7 +106,7 @@ def test_recording_mmr_vaccination_e2e_with_triage(
106106
def test_verify_child_cannot_be_vaccinated_twice_for_mmr_on_same_day(
107107
url_with_mmr_session_scheduled,
108108
setup_session_for_mmr,
109-
online_consent_page,
109+
online_consent_wizard_page,
110110
sessions_search_page,
111111
sessions_overview_page,
112112
sessions_register_page,
@@ -143,18 +143,20 @@ def test_verify_child_cannot_be_vaccinated_twice_for_mmr_on_same_day(
143143
Programme.health_questions(Programme.MMR, ConsentOption.MMR_WITHOUT_GELATINE)
144144
)
145145

146-
online_consent_page.go_to_url(url_with_mmr_session_scheduled)
146+
online_consent_wizard_page.go_to_url(url_with_mmr_session_scheduled)
147147
start_page.start()
148148

149-
online_consent_page.fill_details(child, child.parents[0], schools)
150-
online_consent_page.agree_to_mmr_vaccination(ConsentOption.MMR_WITHOUT_GELATINE)
151-
online_consent_page.fill_address_details(*child.address)
152-
online_consent_page.answer_health_questions(
149+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
150+
online_consent_wizard_page.agree_to_mmr_vaccination(
151+
ConsentOption.MMR_WITHOUT_GELATINE
152+
)
153+
online_consent_wizard_page.fill_address_details(*child.address)
154+
online_consent_wizard_page.answer_health_questions(
153155
number_of_health_questions,
154156
yes_to_health_questions=False,
155157
)
156-
online_consent_page.click_confirm()
157-
online_consent_page.check_final_consent_message(
158+
online_consent_wizard_page.click_confirm()
159+
online_consent_wizard_page.check_final_consent_message(
158160
child,
159161
programmes=[Programme.MMR],
160162
yes_to_health_questions=False,
@@ -190,7 +192,7 @@ def test_verify_child_cannot_be_vaccinated_twice_for_mmr_on_same_day(
190192
def test_recording_mmr_vaccination_e2e_with_imported_dose_one(
191193
url_with_mmr_session_scheduled,
192194
setup_session_for_mmr,
193-
online_consent_page,
195+
online_consent_wizard_page,
194196
sessions_search_page,
195197
sessions_overview_page,
196198
sessions_register_page,
@@ -234,18 +236,18 @@ def test_recording_mmr_vaccination_e2e_with_imported_dose_one(
234236
log_in_page.log_out()
235237

236238
# Proceed with consent and vaccination process
237-
online_consent_page.go_to_url(url_with_mmr_session_scheduled)
239+
online_consent_wizard_page.go_to_url(url_with_mmr_session_scheduled)
238240
start_page.start()
239241

240-
online_consent_page.fill_details(child, child.parents[0], schools)
241-
online_consent_page.agree_to_mmr_vaccination(ConsentOption.MMR_EITHER)
242-
online_consent_page.fill_address_details(*child.address)
243-
online_consent_page.answer_health_questions(
242+
online_consent_wizard_page.fill_details(child, child.parents[0], schools)
243+
online_consent_wizard_page.agree_to_mmr_vaccination(ConsentOption.MMR_EITHER)
244+
online_consent_wizard_page.fill_address_details(*child.address)
245+
online_consent_wizard_page.answer_health_questions(
244246
number_of_health_questions,
245247
yes_to_health_questions=True,
246248
)
247-
online_consent_page.click_confirm()
248-
online_consent_page.check_final_consent_message(
249+
online_consent_wizard_page.click_confirm()
250+
online_consent_wizard_page.check_final_consent_message(
249251
child,
250252
programmes=[Programme.MMR],
251253
yes_to_health_questions=True,

0 commit comments

Comments
 (0)