Skip to content

Commit 7d36c85

Browse files
Changing line 117 so that it can click on both attended and non-attended dropdown optionswithout a 30 second timeout
1 parent 8b33f03 commit 7d36c85

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

pages/screening_practitioner_appointments/book_appointment_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, page: Page):
2424
def select_screening_centre_dropdown_option(self, screening_centre: str) -> None:
2525
self.screening_center_dropdown.select_option(label=screening_centre)
2626

27-
def select_site_dropdown_option(self, screening_site: str) -> None:
27+
def select_site_dropdown_option(self, screening_site: str | list) -> None:
2828
self.site_dropdown.select_option(label=screening_site)
2929
self.site_dropdown.press("Enter")
3030

tests/smokescreen/test_compartment_4.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,13 @@ def test_compartment_4(page: Page, smokescreen_properties: dict) -> None:
102102
BookAppointmentPage(page).select_screening_centre_dropdown_option(
103103
"BCS001 - Wolverhampton Bowel Cancer Screening Centre"
104104
)
105-
try:
106-
BookAppointmentPage(page).select_site_dropdown_option(
107-
"The Royal Hospital (Wolverhampton) (? km)"
108-
)
109-
except Exception:
110-
logging.warning("Subject already attended")
111-
BookAppointmentPage(page).select_site_dropdown_option(
112-
"The Royal Hospital (Wolverhampton) (? km) (attended)"
113-
)
105+
BookAppointmentPage(page).select_site_dropdown_option(
106+
[
107+
"The Royal Hospital (Wolverhampton) (? km)",
108+
"The Royal Hospital (Wolverhampton) (? km) (attended)",
109+
]
110+
)
111+
114112
current_month_displayed = BookAppointmentPage(
115113
page
116114
).get_current_month_displayed()

0 commit comments

Comments
 (0)