Skip to content

Commit 1a18b45

Browse files
Merge branch 'main' of github.com:NHSDigital/bcss-playwright into feature/BCSS-21168-repo-improvements
# Conflicts: # utils/oracle/subject_creation_util.py
2 parents 7088135 + cd518a5 commit 1a18b45

File tree

9 files changed

+442
-14
lines changed

9 files changed

+442
-14
lines changed

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,5 +224,6 @@ cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:
224224
cae84544e2852202f5d0abb9ad18f9d83a0c6d80:subject_criteria_builder/criteria.json:generic-api-key:4210
225225
203cd8811be75d33859eb7c7cc8a48beb5a2b8b2:subject_criteria_builder/criteria.json:generic-api-key:4210
226226
60468a7d6f3ff3259616757be85d6f07e62d00b6:subject_criteria_builder/criteria.json:generic-api-key:4210
227+
145171b9e9d169acb136fc527708c997c9ad9f61:subject_criteria_builder/criteria.json:generic-api-key:4210
227228
2ccb5e91033934d4818c1efa2eb1696b5511ebc9:subject_criteria_builder/criteria.json:generic-api-key:4210
228229
145171b9e9d169acb136fc527708c997c9ad9f61:subject_criteria_builder/criteria.json:generic-api-key:4210

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_3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_scenario_3(page: Page) -> None:
254254
SubjectScreeningSummaryPage(page).click_first_fobt_episode_link()
255255

256256
# And I view the latest practitioner appointment in the subject's episode
257-
EpisodeEventsAndNotesPage(page).click_view_appointment_link()
257+
EpisodeEventsAndNotesPage(page).click_most_recent_view_appointment_link()
258258

259259
# And The Screening Centre cancels the practitioner appointment with reason "Screening Centre Cancelled - Other Reason"
260260
AppointmentDetailPage(page).check_cancel_radio()
@@ -482,7 +482,7 @@ def cancel_appointment_and_processes_batches(page: Page, nhs_no: str) -> None:
482482
SubjectScreeningSummaryPage(page).click_first_fobt_episode_link()
483483

484484
# And I view the latest practitioner appointment in the subject's episode
485-
EpisodeEventsAndNotesPage(page).click_view_appointment_link()
485+
EpisodeEventsAndNotesPage(page).click_most_recent_view_appointment_link()
486486

487487
# And The subject cancels the practitioner appointment with reason "Patient Cancelled to Consider"
488488
AppointmentDetailPage(page).check_cancel_radio()

tests/regression/regression_tests/fobt_regression_tests/test_scenario_4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def test_scenario_4(page: Page) -> None:
332332
SubjectScreeningSummaryPage(page).click_first_fobt_episode_link()
333333

334334
# And I view the latest practitioner appointment in the subject's episode
335-
EpisodeEventsAndNotesPage(page).click_view_appointment_link()
335+
EpisodeEventsAndNotesPage(page).click_most_recent_view_appointment_link()
336336

337337
# And the subject cancels the practitioner appointment with reason "Patient Cancelled to Consider"
338338
AppointmentDetailPage(page).check_cancel_radio()
@@ -412,7 +412,7 @@ def test_scenario_4(page: Page) -> None:
412412
SubjectScreeningSummaryPage(page).click_first_fobt_episode_link()
413413

414414
# And I view the latest practitioner appointment in the subject's episode
415-
EpisodeEventsAndNotesPage(page).click_view_appointment_link()
415+
EpisodeEventsAndNotesPage(page).click_most_recent_view_appointment_link()
416416

417417
# And the subject cancels the practitioner appointment with reason "Patient Unsuitable - Recently Screened"
418418
AppointmentDetailPage(page).check_cancel_radio()

0 commit comments

Comments
 (0)