Skip to content

Commit 9612ef1

Browse files
committed
Modified POM and refactor compartment5 to work it end to end
1 parent 50f90c8 commit 9612ef1

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

pages/screening_subject_search/contact_with_patient_page.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ def __init__(self, page: Page):
1919
"#UI_CALLER_ID"
2020
)
2121
self.calendar_button = self.page.get_by_role("button", name="Calendar")
22-
self.time_from_text_field = self.page.get_by_role("textbox", name="Start Time")
23-
self.time_to_text_field = self.page.get_by_role("textbox", name="End Time")
24-
self.discussion_record_text_field = self.page.get_by_role(
25-
"textbox", name="Discussion Record"
26-
)
27-
self.outcome_dropdown = self.page.locator("##UI_OUTCOME")
22+
self.start_time_field = self.page.locator("#UI_START_TIME")
23+
self.end_time_field = self.page.locator("#UI_END_TIME")
24+
self.discussion_record_text_field = page.locator("#UI_COMMENT_ID")
25+
26+
self.outcome_dropdown = self.page.locator("#UI_OUTCOME")
2827
self.save_button = self.page.get_by_role("button", name="Save")
2928

3029
def select_direction_dropdown_option(self, direction: str) -> None:
@@ -37,10 +36,10 @@ def click_calendar_button(self) -> None:
3736
self.click(self.calendar_button)
3837

3938
def enter_start_time(self, start_time: str) -> None:
40-
self.time_from_text_field.fill(start_time)
39+
self.start_time_field.fill(start_time)
4140

4241
def enter_end_time(self, end_time: str) -> None:
43-
self.time_to_text_field.fill(end_time)
42+
self.end_time_field.fill(end_time)
4443

4544
def enter_discussion_record_text(self, value: str) -> None:
4645
self.discussion_record_text_field.fill(value)

tests/smokescreen/test_compartment_5.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,16 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
8181
AppointmentCalendar(page).select_site_dropdown(
8282
smokescreen_properties["c5_eng_site"]
8383
)
84+
# page.get_by_role("link", name="Screening Practitioner").select_option("")
8485

8586
AppointmentCalendar(page).click_view_appointments_on_this_day_button()
8687
ScreeningPractitionerDayView(page).click_calendar_button()
8788
date_from_util = datetime(2025, 5, 2)
8889
CalendarPicker(page).v1_calender_picker(date_from_util)
90+
# page.locator("#UI_PRACTITIONER_NDV").select_option("")
8991

9092
# Select subject from inital test data util
91-
ScreeningPractitionerDayView(page).click_patient_link("ENDLESS MUMBO-JUMBO")
93+
ScreeningPractitionerDayView(page).click_patient_link("REGALLY DRAGONISH")
9294

9395
# Select Attendance radio button, tick Attended checkbox, set Attended Date to yesterday's (system) date and then press Save
9496
AppointmentDetail(page).check_attendance_radio()
@@ -101,7 +103,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
101103
# Repeat for x Abnormal patients
102104

103105
# Navigate to the 'Subject Screening Summary' screen for the 1st Abnormal patient
104-
nhs_no = "9687900415" # Test NHS NO for DIVIDEND MUZZLE
106+
nhs_no = "9645516129" # Test NHS NO for DIVIDEND MUZZLE
105107
verify_subject_event_status_by_nhs_no(
106108
page, nhs_no, "J10 - Attended Colonoscopy Assessment Appointment"
107109
)
@@ -207,7 +209,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
207209
ContactWithPatientPage(page).click_save_button()
208210

209211
verify_subject_event_status_by_nhs_no(
210-
page, nhs_no, "A361 - Other Post-investigation Contact Required"
212+
page, nhs_no, "A323 - Post-investigation Appointment NOT Required"
211213
)
212214

213215
# Repeat above for x subjects

0 commit comments

Comments
 (0)