|
2 | 2 | from playwright.sync_api import Page |
3 | 3 | from pages.logout.log_out_page import Logout |
4 | 4 | from pages.base_page import BasePage |
| 5 | +from pages.screening_practitioner_appointments.appointment_calendar_page import ( |
| 6 | + AppointmentCalendar, |
| 7 | +) |
| 8 | +from pages.screening_practitioner_appointments.appointment_detail_page import ( |
| 9 | + AppointmentDetail, |
| 10 | +) |
5 | 11 | from pages.screening_practitioner_appointments.screening_practitioner_appointments import ( |
6 | 12 | ScreeningPractitionerAppointmentsPage, |
7 | 13 | ) |
| 14 | +from pages.screening_practitioner_appointments.screening_practitioner_day_view import ( |
| 15 | + ScreeningPractitionerDayView, |
| 16 | +) |
8 | 17 | from pages.datasets.subject_datasets_page import ( |
9 | 18 | SubjectDatasetsPage, |
10 | 19 | ) |
|
13 | 22 | FitForColonoscopySspOptions, |
14 | 23 | AsaGradeOptions, |
15 | 24 | ) |
16 | | -from pages.screening_subject_search.subject_screening_summary import ( |
17 | | - SubjectScreeningSummary, |
18 | | -) |
19 | 25 | from pages.screening_subject_search.advance_fobt_screening_episode_page import ( |
20 | 26 | AdvanceFOBTScreeningEpisode, |
21 | 27 | ) |
22 | | -from pages.screening_practitioner_appointments.screening_practitioner_day_view import ( |
23 | | - ScreeningPractitionerDayView, |
24 | | -) |
25 | | -from pages.screening_practitioner_appointments.appointment_detail_page import ( |
26 | | - AppointmentDetail, |
27 | | -) |
28 | | -from pages.screening_practitioner_appointments.appointment_calendar_page import ( |
29 | | - AppointmentCalendar, |
30 | | -) |
31 | 28 | from pages.screening_subject_search.attend_diagnostic_test_page import ( |
32 | 29 | AttendDiagnosticTest, |
33 | 30 | ) |
| 31 | +from pages.screening_subject_search.subject_screening_summary import ( |
| 32 | + SubjectScreeningSummary, |
| 33 | +) |
| 34 | + |
| 35 | +from pages.screening_subject_search.contact_with_patient_page import ( |
| 36 | + ContactWithPatientPage, |
| 37 | +) |
| 38 | + |
34 | 39 | from utils.user_tools import UserTools |
35 | 40 | from utils.load_properties_file import PropertiesFile |
36 | 41 | from utils.screening_subject_page_searcher import verify_subject_event_status_by_nhs_no |
@@ -182,20 +187,17 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None: |
182 | 187 | page |
183 | 188 | ).click_record_other_post_investigation_contact_button() |
184 | 189 |
|
185 | | - page.locator("#UI_DIRECTION").select_option(label="To patient") |
186 | | - page.locator("#UI_CALLER_ID").select_option(index=1) |
187 | | - page.get_by_role("button", name="Calendar").click() |
| 190 | + ContactWithPatientPage(page).select_direction_dropdown_option("To patient") |
| 191 | + ContactWithPatientPage(page).select_caller_id_dropdown_index_option(1) |
| 192 | + ContactWithPatientPage(page).click_calendar_button() |
188 | 193 | CalendarPicker(page).v1_calender_picker(datetime.today()) |
189 | | - page.locator("#UI_START_TIME").click() |
190 | | - page.locator("#UI_START_TIME").fill("11:00") |
191 | | - page.locator("#UI_END_TIME").click() |
192 | | - page.locator("#UI_END_TIME").fill("12:00") |
193 | | - page.locator("#UI_COMMENT_ID").click() |
194 | | - page.locator("#UI_COMMENT_ID").fill("Test Automation") |
195 | | - page.locator("#UI_OUTCOME").select_option( |
196 | | - label="Post-investigation Appointment Not Required" |
| 194 | + ContactWithPatientPage(page).enter_start_time("11:00") |
| 195 | + ContactWithPatientPage(page).enter_end_time("12:00") |
| 196 | + ContactWithPatientPage(page).enter_discussion_record_text("Test Automation") |
| 197 | + ContactWithPatientPage(page).select_outcome_dropdown_option( |
| 198 | + "Post-investigation Appointment Not Required" |
197 | 199 | ) |
198 | | - page.get_by_role("button", name="Save").click() |
| 200 | + ContactWithPatientPage(page).click_save_button() |
199 | 201 |
|
200 | 202 | verify_subject_event_status_by_nhs_no( |
201 | 203 | page, nhs_no, "A323 - Post-investigation Appointment NOT Required" |
|
0 commit comments