33from mavis .test .constants import (
44 ConsentOption ,
55 ConsentRefusalReason ,
6+ ConsentStatus ,
67 Programme ,
78 Vaccine ,
89)
@@ -182,8 +183,8 @@ def test_consent_refusal_with_follow_up_request(
182183
183184 SessionsChildrenPage (page ).click_child (child )
184185
185- status = "Follow-up requested" if follow_up_requested else "Consent refused"
186- SessionsPatientPage (page ).expect_consent_status (Programme . MMR_MMRV , status )
186+ status = ConsentStatus . FOLLOW_UP_REQUESTED if follow_up_requested else ConsentStatus . REFUSED
187+ SessionsPatientPage (page ).expect_consent_status (status )
187188
188189 SessionsPatientPage (page ).click_session_activity_and_notes ()
189190
@@ -290,9 +291,7 @@ def test_follow_up_journey_decision_stands_confirm_refusal(
290291 SessionsChildrenPage (page ).tabs .click_children_tab ()
291292 SessionsChildrenPage (page ).click_child (child )
292293
293- SessionsPatientPage (page ).expect_consent_status (
294- Programme .MMR_MMRV , "Follow-up requested"
295- )
294+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .FOLLOW_UP_REQUESTED )
296295
297296 SessionsPatientPage (page ).click_response_from_parent (parent )
298297 ConsentResponseDetailsPage (page ).expect_follow_up_available ()
@@ -306,9 +305,7 @@ def test_follow_up_journey_decision_stands_confirm_refusal(
306305 ConsentConfirmRefusalPage (page ).expect_refusal_confirmation_success ()
307306
308307 SessionsPatientPage (page ).click_back ()
309- SessionsPatientPage (page ).expect_consent_status (
310- Programme .MMR_MMRV , "Consent refused"
311- )
308+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .REFUSED )
312309
313310 SessionsPatientPage (page ).click_session_activity_and_notes ()
314311
@@ -377,7 +374,7 @@ def test_follow_up_journey_decision_changed_record_consent(
377374 SessionsPatientPage (page ).expect_consent_recorded_success ()
378375
379376 SessionsChildrenPage (page ).click_child (child )
380- SessionsPatientPage (page ).expect_consent_status ("MMR" , "Consent given" )
377+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus . GIVEN )
381378
382379 SessionsPatientPage (page ).verify_original_response_invalidated (
383380 parent , "Consent given in follow-up discussion."
@@ -434,9 +431,7 @@ def test_gillick_self_consent_overrides_follow_up_requested(
434431 SessionsChildrenPage (page ).search .click_on_update_results ()
435432 SessionsChildrenPage (page ).click_child (child )
436433
437- SessionsPatientPage (page ).expect_consent_status (
438- Programme .MMR_MMRV , "Follow-up requested"
439- )
434+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .FOLLOW_UP_REQUESTED )
440435
441436 SessionsPatientPage (page ).click_assess_gillick_competence ()
442437 GillickCompetencePage (page ).add_gillick_competence (is_competent = True )
@@ -452,15 +447,15 @@ def test_gillick_self_consent_overrides_follow_up_requested(
452447
453448 SessionsChildrenPage (page ).search .select_due_vaccination ()
454449 SessionsChildrenPage (page ).search .search_and_click_child (child )
455- SessionsPatientPage (page ).expect_consent_status ("MMR" , "Consent given" )
450+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus . GIVEN )
456451
457452
458453@pytest .mark .parametrize (
459454 ("parent2_action" , "expected_status" ),
460455 [
461- ("given" , "Follow-up requested" ),
462- ("refused" , "Conflicting consent" ),
463- ("follow_up" , "Follow-up requested" ),
456+ ("given" , ConsentStatus . FOLLOW_UP_REQUESTED ),
457+ ("refused" , ConsentStatus . CONFLICTS ),
458+ ("follow_up" , ConsentStatus . FOLLOW_UP_REQUESTED ),
464459 ],
465460 ids = [
466461 "parent_1_follow_up_parent_2_given" ,
@@ -522,14 +517,14 @@ def test_multiple_parents_with_follow_up_request(
522517 )
523518 SessionsChildrenPage (page ).tabs .click_children_tab ()
524519
525- if expected_status == "Conflicting consent" :
520+ if expected_status == ConsentStatus . CONFLICTS :
526521 SessionsChildrenPage (page ).search .select_has_a_refusal ()
527522 SessionsChildrenPage (page ).search .select_conflicting_consent ()
528523 else :
529524 SessionsChildrenPage (page ).search .select_needs_consent ()
530525
531526 SessionsChildrenPage (page ).search .search_and_click_child (child )
532- SessionsPatientPage (page ).expect_consent_status (Programme . MMR_MMRV , expected_status )
527+ SessionsPatientPage (page ).expect_consent_status (expected_status )
533528
534529 if parent2_action != "follow_up" :
535530 SessionsPatientPage (page ).click_response_from_parent (child .parents [1 ])
0 commit comments