Skip to content

Commit 57a22cd

Browse files
committed
Added docstrings and addressed PR comments
1 parent f77b51a commit 57a22cd

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

pages/datasets/colonoscopy_dataset_page.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55

66
class ColonoscopyDatasetsPage(BasePage):
7+
"""
8+
This class contains locators and methods to interact with the Colonoscopy Datasets page.
9+
"""
10+
711
def __init__(self, page: Page):
812
super().__init__(page)
913
self.page = page
1014

1115
# Colonoscopy datasets page locators
12-
self.show_dataset_button = self.page.get_by_role("link", name="Show Dataset")
13-
1416
self.save_dataset_button = self.page.locator(
1517
"#UI_DIV_BUTTON_SAVE1"
1618
).get_by_role("button", name="Save Dataset")
@@ -29,16 +31,29 @@ def __init__(self, page: Page):
2931
"radio", name="No"
3032
)
3133

32-
def click_show_datasets(self) -> None:
33-
self.click(self.show_dataset_button)
34-
3534
def save_dataset(self) -> None:
3635
self.click(self.save_dataset_button)
3736

3837
def select_asa_grade_option(self, option: str) -> None:
38+
"""
39+
This method is designed to select a specific grade option from the colonoscopy dataset page, ASA Grade dropdown menu.
40+
Args:
41+
option (str): The ASA grade option to be selected. This should be a string that matches one of the available options in the dropdown menu.
42+
Valid options are: "FIT", "RELEVANT_DISEASE", "UNABLE_TO_ASSESS", RESTRICTIVE_DISEASE, "LIFE_THREATENING_DISEASE", "MORIBUND", "NOT_APPLICABLE", or "NOT_KNOWN".
43+
Returns:
44+
None
45+
"""
3946
self.select_asa_grade_dropdowen.select_option(option)
4047

4148
def select_fit_for_colonoscopy_option(self, option: str) -> None:
49+
"""
50+
This method is designed to select a specific option from the colonoscopy dataset page, Fit for Colonoscopy (SSP) dropdown menu.
51+
Args:
52+
option (str): The option to be selected. This should be a string that matches one of the available options in the dropdown menu.
53+
Valid options are: "YES", "NO", or "UNABLE_TO_ASSESS".
54+
Returns:
55+
None
56+
"""
4257
self.select_fit_for_colonoscopy_dropdown.select_option(option)
4358

4459
def click_dataset_complete_radio_button_yes(self) -> None:

pages/datasets/subject_datasets_page.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44

55
class SubjectDatasetsPage(BasePage):
6+
"""
7+
This class contains locators and methods to interact with the Subject Datasets page.
8+
"""
9+
610
def __init__(self, page: Page):
711
super().__init__(page)
812
self.page = page

tests/smokescreen/test_compartment_5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
7676

7777
AppointmentCalendar(page).click_view_appointments_on_this_day_button()
7878
ScreeningPractitionerDayView(page).click_calendar_button()
79-
date_from_util = datetime(2025, 4, 29)
79+
date_from_util = datetime(2025, 5, 1)
8080
CalendarPicker(page).v1_calender_picker(date_from_util)
8181

8282
# Select subject from inital test data util
83-
ScreeningPractitionerDayView(page).click_patient_link("REFUSE CRUMBLE")
83+
ScreeningPractitionerDayView(page).click_patient_link("CRUMBLE REFUSE")
8484

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

9595
# Navigate to the 'Subject Screening Summary' screen for the 1st Abnormal patient
96-
nhs_no = "9724560430" # Test NHS NO for Scaliding Cod
96+
nhs_no = "9724560430" # Test NHS NO for CRUMBLE REFUSE
9797
verify_subject_event_status_by_nhs_no(
9898
page, nhs_no, "J10 - Attended Colonoscopy Assessment Appointment"
9999
)

0 commit comments

Comments
 (0)