Skip to content

Commit 12f635f

Browse files
Addressing PR comments
1 parent 885c9cb commit 12f635f

File tree

8 files changed

+17
-26
lines changed

8 files changed

+17
-26
lines changed

pages/screening_practitioner_appointments/book_appointment_page.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def __init__(self, page: Page):
2323
self.screening_practitioner_dropdown = self.page.locator("#UI_NEW_PRACTITIONER")
2424

2525
self.appointment_cell_locators = self.page.locator("input.twoColumnCalendar")
26-
self.available_background_colour = "rgb(102, 255, 153)"
27-
self.some_available_background_colour = "rgb(255, 220, 144)"
26+
self.appointment_fully_available_colour = "rgb(102, 255, 153)" # Mint Green
27+
self.appointment_partially_available_colour = (
28+
"rgb(255, 220, 144)" # Peach Orange
29+
)
2830
self.appointment_date_input = self.page.locator("#UI_NEW_APPT_DATE")
2931
self.appointment_time_start_time_input = self.page.locator(
3032
"#UI_NEW_APPT_TIME_FROM"

pages/screening_subject_search/advance_fobt_screening_episode_page.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, page: Page):
1616
)
1717
self.calendar_button = self.page.get_by_role("button", name="Calendar")
1818
self.test_type_dropdown = self.page.locator("[id^='UI_EXT_TEST_TYPE_']")
19-
self.advance_checkbox = self.page.get_by_label(
19+
self.advance_checkbox_label = self.page.get_by_label(
2020
"There are some events available which should only be used in exceptional circumstances. If you wish to see them, check this box"
2121
)
2222
self.invite_for_diagnostic_test_button = self.page.get_by_role(
@@ -46,7 +46,7 @@ def __init__(self, page: Page):
4646
self.amend_diagnosis_date_button = self.page.get_by_role(
4747
"button", name="Amend Diagnosis Date"
4848
)
49-
self.advance_checkbox_v2 = self.page.get_by_role("checkbox")
49+
self.advance_checkbox_label_v2 = self.page.get_by_role("checkbox")
5050
self.subsequent_assessment_appointment_required_dropdown = (
5151
self.page.get_by_role("combobox")
5252
)
@@ -72,11 +72,6 @@ def __init__(self, page: Page):
7272
self.cancel_diagnostic_test_button = self.page.get_by_role(
7373
"button", name="Cancel Diagnostic Test"
7474
)
75-
self.waiting_decision_to_preceed_with_diagnostic_test_button = (
76-
self.page.get_by_role(
77-
"button", name="Waiting Decision to Proceed with Diagnostic Test"
78-
)
79-
)
8075
self.post_investigation_appointment_required_button = self.page.get_by_role(
8176
"button", name="Post-investigation Appointment Required"
8277
)
@@ -149,11 +144,11 @@ def click_record_contact_with_patient_button(self) -> None:
149144

150145
def check_advance_checkbox(self) -> None:
151146
"""Selects the 'Advance FOBT' checkbox"""
152-
self.advance_checkbox.check()
147+
self.advance_checkbox_label.check()
153148

154149
def click_amend_diagnosis_date_button(self) -> None:
155150
"""Checks the 'Advance FOBT' checkbox and clicks the 'Amend Diagnosis Date' button."""
156-
self.advance_checkbox_v2.check()
151+
self.advance_checkbox_label_v2.check()
157152
self.click(self.amend_diagnosis_date_button)
158153

159154
def click_and_select_subsequent_assessment_appointment_required(
@@ -197,12 +192,6 @@ def click_cancel_diagnostic_test_button(self) -> None:
197192
"""Click the 'Cancel Diagnostic Test' button."""
198193
self.safe_accept_dialog(self.cancel_diagnostic_test_button)
199194

200-
def click_waiting_decision_to_preceed_with_diagnostic_test_button(self) -> None:
201-
"""Click the 'Waiting Decision to Proceed with Diagnostic Test' button."""
202-
self.safe_accept_dialog(
203-
self.waiting_decision_to_preceed_with_diagnostic_test_button
204-
)
205-
206195
def click_post_investigation_appointment_required_button(self) -> None:
207196
"""Click the 'Post-investigation Appointment Required' button."""
208197
self.safe_accept_dialog(self.post_investigation_appointment_required_button)

pages/screening_subject_search/contact_with_patient_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def verify_contact_with_patient_page_is_displayed(self) -> None:
151151

152152
def verify_outcome_select_options(self, options: list) -> None:
153153
"""
154-
Verifies that the 'Outcome' dropwdown contains the expected options.
154+
Verifies that the 'Outcome' dropdown contains the expected options.
155155
Args:
156156
options (list): A list containing all of the expected options in the dropdown.
157157
Raises:

tests/regression/regression_tests/fobt_regression_tests/test_scenario_10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def test_scenario_10(page: Page) -> None:
300300
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()
301301
AdvanceFOBTScreeningEpisodePage(
302302
page
303-
).click_waiting_decision_to_preceed_with_diagnostic_test_button()
303+
).click_waiting_decision_to_proceed_with_diagnostic_test()
304304

305305
# Then my subject has been updated as follows:
306306
AdvanceFOBTScreeningEpisodePage(page).verify_latest_event_status_value(

tests/regression/subject/episodes/datasets/investigation/endoscopy/polypcategories/test_setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def setup_a99_status(page: Page, df: pd.DataFrame) -> pd.DataFrame:
254254
current_month_displayed,
255255
BookAppointmentPage(page).appointment_cell_locators,
256256
[
257-
BookAppointmentPage(page).available_background_colour,
258-
BookAppointmentPage(page).some_available_background_colour,
257+
BookAppointmentPage(page).appointment_fully_available_colour,
258+
BookAppointmentPage(page).appointment_partially_available_colour,
259259
],
260260
)
261261
BookAppointmentPage(page).appointments_table.click_first_input_in_column(

tests/smokescreen/test_compartment_4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def test_compartment_4(page: Page, smokescreen_properties: dict) -> None:
116116
current_month_displayed,
117117
BookAppointmentPage(page).appointment_cell_locators,
118118
[
119-
BookAppointmentPage(page).available_background_colour,
120-
BookAppointmentPage(page).some_available_background_colour,
119+
BookAppointmentPage(page).appointment_fully_available_colour,
120+
BookAppointmentPage(page).appointment_partially_available_colour,
121121
],
122122
)
123123
BookAppointmentPage(page).appointments_table.click_first_input_in_column(

utils/appointments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def book_appointments(page: Page, screening_centre: str, site: str) -> None:
112112
current_month_displayed,
113113
book_appointments_page.appointment_cell_locators,
114114
[
115-
book_appointments_page.available_background_colour,
116-
book_appointments_page.some_available_background_colour,
115+
book_appointments_page.appointment_fully_available_colour,
116+
book_appointments_page.appointment_partially_available_colour,
117117
],
118118
)
119119
page.wait_for_timeout(500) # Wait for the appointments to load

utils/datasets/investigation_datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def get_default_endoscopy_information() -> dict:
253253
}
254254

255255

256-
def get_normal_smokescreen_information() -> tuple:
256+
def get_normal_smokescreen_information() -> tuple[dict, dict, dict, dict, dict]:
257257
"""
258258
Returns a tuple containing default information for a normal smokescreen investigation dataset.
259259
This includes general information, drug information, endoscopy information,

0 commit comments

Comments
 (0)