Skip to content

Commit 3dcf26d

Browse files
committed
wip
1 parent d075be5 commit 3dcf26d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

pages/screening_subject_search/episode_events_and_notes_page.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ def __init__(self, page: Page):
99
super().__init__(page)
1010
self.page = page
1111
# List of episode events and notes - page locators
12-
self.view_appointment_link = self.page.get_by_role(
13-
"link", name="View Appointment"
14-
)
12+
self.most_recent_view_appointment_link = self.page.get_by_role(
13+
"link", name="View Appointment"
14+
).nth(0)
1515

1616
def expected_episode_event_is_displayed(self, event_description: str) -> None:
1717
"""Check if the expected episode event is displayed on the page."""
1818
expect(
1919
self.page.get_by_role("cell", name=event_description, exact=True)
2020
).to_be_visible()
2121

22-
def click_view_appointment_link(self) -> None:
22+
def click_most_recent_view_appointment_link(self) -> None:
2323
"""Click the 'View Appointment' link"""
24-
self.click(self.view_appointment_link)
24+
self.click(self.most_recent_view_appointment_link)

tests/regression/regression_tests/fobt_regression_tests/test_scenario_5.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def test_scenario_5(page: Page) -> None:
242242
page,
243243
"J11",
244244
"Practitioner Clinic 1st Appointment Non Attendance (Patient)",
245-
"J27 Appointment Non-attendance Letter Sent (Patient)",
245+
"J27 - Appointment Non-attendance Letter Sent (Patient)",
246246
)
247247

248248
# When I view the subject
@@ -301,7 +301,7 @@ def test_scenario_5(page: Page) -> None:
301301
page,
302302
"A185",
303303
"Patient Discharge (Non Attendance of Practitioner Clinic)",
304-
"A37 Patient Discharge Sent (Non-attendance at Colonoscopy Assessment Appointment)",
304+
"A37 - Patient Discharge Sent (Non-attendance at Colonoscopy Assessment Appointment)",
305305
)
306306

307307
# When I switch users to BCSS "England" as user role "Hub Manager"
@@ -316,7 +316,7 @@ def test_scenario_5(page: Page) -> None:
316316
page,
317317
"A37",
318318
"GP Discharge (Non Attendance of Practitioner Clinic)",
319-
"P202 Waiting Completion of Outstanding Events",
319+
"P202 - Waiting Completion of Outstanding Events",
320320
)
321321

322322
# When I view the subject
@@ -351,7 +351,7 @@ def test_scenario_5(page: Page) -> None:
351351
page,
352352
"A183",
353353
"GP Result (Abnormal)",
354-
"A166 GP Discharge Sent (No show for Colonoscopy Assessment Appointment)",
354+
"A166 - GP Discharge Sent (No show for Colonoscopy Assessment Appointment)",
355355
)
356356

357357
subject_assertion(

utils/appointments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def mark_appointment_as_dna(page: Page, non_attendance_reason: str) -> None:
160160
)
161161
subject_screening_summary_page.click_list_episodes()
162162
subject_screening_summary_page.click_view_events_link()
163-
episode_events_and_notes_page.click_view_appointment_link()
163+
episode_events_and_notes_page.click_most_recent_view_appointment_link()
164164
appointment_detail_page.check_attendance_radio()
165165
page.locator("#UI_NON_ATTENDANCE_REASON").select_option(label=non_attendance_reason)
166166
appointment_detail_page.click_save_button(accept_dialog=True)

0 commit comments

Comments
 (0)