33from mavis .test .constants import (
44 ConsentOption ,
55 ConsentRefusalReason ,
6+ ConsentStatus ,
67 Programme ,
78 Vaccine ,
89)
@@ -182,8 +183,12 @@ 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 = (
187+ ConsentStatus .FOLLOW_UP_REQUESTED
188+ if follow_up_requested
189+ else ConsentStatus .REFUSED
190+ )
191+ SessionsPatientPage (page ).expect_consent_status (status )
187192
188193 SessionsPatientPage (page ).click_session_activity_and_notes ()
189194
@@ -290,9 +295,7 @@ def test_follow_up_journey_decision_stands_confirm_refusal(
290295 SessionsChildrenPage (page ).tabs .click_children_tab ()
291296 SessionsChildrenPage (page ).click_child (child )
292297
293- SessionsPatientPage (page ).expect_consent_status (
294- Programme .MMR_MMRV , "Follow-up requested"
295- )
298+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .FOLLOW_UP_REQUESTED )
296299
297300 SessionsPatientPage (page ).click_response_from_parent (parent )
298301 ConsentResponseDetailsPage (page ).expect_follow_up_available ()
@@ -306,9 +309,7 @@ def test_follow_up_journey_decision_stands_confirm_refusal(
306309 ConsentConfirmRefusalPage (page ).expect_refusal_confirmation_success ()
307310
308311 SessionsPatientPage (page ).click_back ()
309- SessionsPatientPage (page ).expect_consent_status (
310- Programme .MMR_MMRV , "Consent refused"
311- )
312+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .REFUSED )
312313
313314 SessionsPatientPage (page ).click_session_activity_and_notes ()
314315
@@ -377,7 +378,7 @@ def test_follow_up_journey_decision_changed_record_consent(
377378 SessionsPatientPage (page ).expect_consent_recorded_success ()
378379
379380 SessionsChildrenPage (page ).click_child (child )
380- SessionsPatientPage (page ).expect_consent_status ("MMR" , "Consent given" )
381+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus . GIVEN )
381382
382383 SessionsPatientPage (page ).verify_original_response_invalidated (
383384 parent , "Consent given in follow-up discussion."
@@ -434,9 +435,7 @@ def test_gillick_self_consent_overrides_follow_up_requested(
434435 SessionsChildrenPage (page ).search .click_on_update_results ()
435436 SessionsChildrenPage (page ).click_child (child )
436437
437- SessionsPatientPage (page ).expect_consent_status (
438- Programme .MMR_MMRV , "Follow-up requested"
439- )
438+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus .FOLLOW_UP_REQUESTED )
440439
441440 SessionsPatientPage (page ).click_assess_gillick_competence ()
442441 GillickCompetencePage (page ).add_gillick_competence (is_competent = True )
@@ -452,15 +451,15 @@ def test_gillick_self_consent_overrides_follow_up_requested(
452451
453452 SessionsChildrenPage (page ).search .select_due_vaccination ()
454453 SessionsChildrenPage (page ).search .search_and_click_child (child )
455- SessionsPatientPage (page ).expect_consent_status ("MMR" , "Consent given" )
454+ SessionsPatientPage (page ).expect_consent_status (ConsentStatus . GIVEN )
456455
457456
458457@pytest .mark .parametrize (
459458 ("parent2_action" , "expected_status" ),
460459 [
461- ("given" , "Follow-up requested" ),
462- ("refused" , "Conflicting consent" ),
463- ("follow_up" , "Follow-up requested" ),
460+ ("given" , ConsentStatus . FOLLOW_UP_REQUESTED ),
461+ ("refused" , ConsentStatus . CONFLICTS ),
462+ ("follow_up" , ConsentStatus . FOLLOW_UP_REQUESTED ),
464463 ],
465464 ids = [
466465 "parent_1_follow_up_parent_2_given" ,
@@ -522,14 +521,14 @@ def test_multiple_parents_with_follow_up_request(
522521 )
523522 SessionsChildrenPage (page ).tabs .click_children_tab ()
524523
525- if expected_status == "Conflicting consent" :
524+ if expected_status == ConsentStatus . CONFLICTS :
526525 SessionsChildrenPage (page ).search .select_has_a_refusal ()
527526 SessionsChildrenPage (page ).search .select_conflicting_consent ()
528527 else :
529528 SessionsChildrenPage (page ).search .select_needs_consent ()
530529
531530 SessionsChildrenPage (page ).search .search_and_click_child (child )
532- SessionsPatientPage (page ).expect_consent_status (Programme . MMR_MMRV , expected_status )
531+ SessionsPatientPage (page ).expect_consent_status (expected_status )
533532
534533 if parent2_action != "follow_up" :
535534 SessionsPatientPage (page ).click_response_from_parent (child .parents [1 ])
0 commit comments