Skip to content

Commit b4dca66

Browse files
Updates post PR comments
1 parent b9e6dc2 commit b4dca66

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pages/screening_practitioner_appointments/practitioner_availability_page.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def __init__(self, page: Page):
1212
self.screening_practitioner_dropdown = page.locator("#UI_PRACTITIONER_ID")
1313
self.calendar_button = page.get_by_role("button", name="Calendar")
1414

15-
def select_royal_hospital_wolverhampton_dropdown_option(self) -> None:
16-
self.site_id_dropdown.select_option(label="THE ROYAL HOSPITAL (WOLVERHAMPTON)")
15+
def select_site_dropdown_option(self, site_to_use: str) -> None:
16+
self.site_id_dropdown.select_option(label=site_to_use)
1717

18-
def select_astonish_ethanol_practitioner_dropdown_option(self) -> None:
19-
self.screening_practitioner_dropdown.select_option(label="Astonish, Ethanol")
18+
def select_practitioner_dropdown_option(self, practitioner: str) -> None:
19+
self.screening_practitioner_dropdown.select_option(label=practitioner)
2020

2121
def click_calendar_button(self) -> None:
2222
self.click(self.calendar_button)

tests/smokescreen/test_compartment_4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def test_compartment_4(page: Page, smokescreen_properties: dict) -> None:
5050
BasePage(page).go_to_screening_practitioner_appointments_page()
5151
ScreeningPractitionerAppointmentsPage(page).go_to_set_availability_page()
5252
SetAvailabilityPage(page).go_to_practitioner_availability_page()
53-
PractitionerAvailabilityPage(page).select_royal_hospital_wolverhampton_dropdown_option()
54-
PractitionerAvailabilityPage(page).select_astonish_ethanol_practitioner_dropdown_option()
53+
PractitionerAvailabilityPage(page).select_site_dropdown_option("THE ROYAL HOSPITAL (WOLVERHAMPTON)")
54+
PractitionerAvailabilityPage(page).select_practitioner_dropdown_option("Astonish, Ethanol")
5555
PractitionerAvailabilityPage(page).click_calendar_button()
5656
CalendarPicker(page).select_day(
5757
datetime.today()

utils/calendar_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def select_day(self, date: datetime) -> None:
7878
This function is used by both the v1 and v2 calendar picker
7979
It extracts the day from the date and then selects that value in the calendar picker
8080
"""
81-
day_to_select = str(date.strftime("%#d"))
81+
day_to_select = str(date.day)
8282
number_of_cells_with_day = self.page.get_by_role(
8383
"cell", name=day_to_select
8484
).count()

0 commit comments

Comments
 (0)