88from pages .screening_subject_search .subject_screening_summary import (
99 SubjectScreeningSummary ,
1010)
11+ from pages .screening_subject_search .advance_fobt_screening_episode_page import (
12+ AdvanceFOBTScreeningEpisode ,
13+ )
1114from pages .screening_practitioner_appointments .screening_practitioner_day_view import (
1215 ScreeningPractitionerDayView ,
1316)
@@ -105,26 +108,24 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
105108 # On the Subject Screening Summary click on the 'Advance FOBT Screening Episode' button and then click on the 'Suitable for Endoscopic Test' button
106109 # Click OK after message
107110 SubjectScreeningSummary (page ).click_advance_fobt_screening_episode_button ()
108- page .once ("dialog" , lambda dialog : dialog .accept ())
109- page .get_by_role ("button" , name = "Suitable for Endoscopic Test" ).click ()
111+ AdvanceFOBTScreeningEpisode (page ).click_suitable_for_endoscopic_test_button ()
110112
111113 # Enter a 'First Offered Appointment Date' (enter a date after the attended appt)
112- page . get_by_role ( "button" , name = "Calendar" ). click ()
114+ AdvanceFOBTScreeningEpisode ( page ). click_calendar_button ()
113115 CalendarPicker (page ).v1_calender_picker (datetime .today ())
114116
115117 # Select 'Colonoscopy' from the 'Type of Test' from the drop down list
116- page . locator ( "#UI_EXT_TEST_TYPE_2233" ). select_option ( label = "Colonoscopy" )
118+ AdvanceFOBTScreeningEpisode ( page ). select_test_type_dropdown_option ( "Colonoscopy" )
117119
118120 # Click the 'Invite for Diagnostic Test >>' button
119121 # Click 'OK'
120- page .once ("dialog" , lambda dialog : dialog .accept ())
121- page .get_by_role ("button" , name = "Invite for Diagnostic Test >>" ).click ()
122+ AdvanceFOBTScreeningEpisode (page ).click_invite_for_diagnostic_test_button ()
122123 SubjectScreeningSummary (page ).verify_latest_event_status_value (
123124 "A59 - Invited for Diagnostic Test"
124125 )
125126
126127 # Click 'Attend Diagnostic Test' button
127- page . get_by_role ( "button" , name = "Attend Diagnostic Test" ). click ()
128+ AdvanceFOBTScreeningEpisode ( page ). click_attend_diagnostic_test_button ()
128129
129130 # Select Colonoscopy from drop down list. Enter the actual appointment date as today's date and select 'Save'
130131 page .locator ("#UI_CONFIRMED_TYPE_OF_TEST" ).select_option (label = "Colonoscopy" )
@@ -144,16 +145,15 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
144145
145146 # Click 'Other Post-investigation Contact Required' button
146147 # Click 'OK'
147- page .once ("dialog" , lambda dialog : dialog .accept ())
148- page .get_by_role ("button" , name = "Other Post-investigation" ).click ()
149- expect (
150- page .get_by_role (
151- "cell" , name = "A361 - Other Post-investigation Contact Required" , exact = True
152- )
153- ).to_be_visible ()
148+ AdvanceFOBTScreeningEpisode (page ).click_other_post_investigation_button ()
149+ AdvanceFOBTScreeningEpisode (page ).verify_latest_event_status_value (
150+ "A361 - Other Post-investigation Contact Required"
151+ )
154152
155153 # Select 'Record other post-investigation contact' button
156- page .get_by_role ("button" , name = "Record other post-" ).click ()
154+ AdvanceFOBTScreeningEpisode (
155+ page
156+ ).click_record_other_post_investigation_contact_button ()
157157
158158 # Complete 'Contact Direction', To patient
159159 # 'Contact made between patient and', Selects the top option in the dropdown
0 commit comments