Skip to content

Commit 1edb273

Browse files
Addressing PR comments
1 parent 76924a5 commit 1edb273

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

pages/screening_subject_search/advance_fobt_screening_episode_page.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ def __init__(self, page: Page):
9696
self.redirect_to_reestablish_suitability_for_diagnostic_test_repatient_contact = self.page.get_by_role(
9797
"button", name="Redirect to re-establish"
9898
)
99-
self.invite_for_diagnostic_test_button = self.page.get_by_role(
100-
"button", name="Invite for Diagnostic Test >>"
101-
)
10299
self.mdt_referral_required_button = self.page.get_by_role(
103100
"button", name="MDT Referral Required"
104101
)

pages/screening_subject_search/non_neoplastic_result_from_symptomatic_procedure_page.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class NonNeoplasticResultFromSymptomaticProcedurePage(BasePage):
99

1010
def __init__(self, page: Page):
1111
super().__init__(page)
12-
self.page = page
1312
# Non Neoplastic Result From Symptomatic Procedure - page locators
1413
self.date_of_symptomatic_procedure_calendar_button = self.page.locator(
1514
"#UI_SURGERY_DATE__LinkOrButton"
@@ -46,7 +45,7 @@ def select_test_number(self, test_number: int) -> None:
4645
"""
4746
Select a test from the all tests dropdown by its index.
4847
Args:
49-
test_number (int): The index of the test to select (1-based index). Example: 1
48+
test_number (int): The index of the test to select (1-based index). Example: if you want to select the 1st test pass in 1
5049
"""
5150
self.click(self.all_tests.nth(test_number - 1))
5251

pages/screening_subject_search/return_from_symptomatic_referral_page.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class ReturnFromSymptomaticReferralPage(BasePage):
77

88
def __init__(self, page: Page):
99
super().__init__(page)
10-
self.page = page
1110
# Return From Symptomatic Referral - page locators
1211
self.radiological_or_endoscopic_referral_dropdown = self.page.locator(
1312
"#referralTypeId"

pages/screening_subject_search/subject_demographic_page.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def handle_dialog(dialog: Dialog):
140140
Handles the dialog and asserts that the dialog contains the expected text.
141141
Args:
142142
dialog (Dialog): the playwright dialog object
143-
accept (bool): Set to True if you want to accept the dialog, by default is is set to False.
144143
"""
145144
logging.info(f"Dialog appeared with message: {dialog.message}")
146145
actual_text = dialog.message

utils/subject_demographics.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,21 @@ def updated_subject_demographics(
114114
Navigates to the subject demographics page and updates a subject's demographics.
115115
Args:
116116
nhs_no (str): The NHS number of the subject you want to update.
117-
date_of_birth (Optional[datetime]): The new date of birth to set for the subject.
118-
postcode (Optional[str]): The new postcode to set for the subject.
117+
age (int): The aage the subject should be updated to.
118+
postcode (str): The new postcode of the subject.
119+
dialog_text (str): The dialog text to assert
119120
"""
121+
subject_screening_page = SubjectScreeningPage(self.page)
120122
BasePage(self.page).click_main_menu_link()
121123
BasePage(self.page).go_to_screening_subject_search_page()
122-
SubjectScreeningPage(self.page).click_demographics_filter()
123-
SubjectScreeningPage(self.page).click_nhs_number_filter()
124-
SubjectScreeningPage(self.page).nhs_number_filter.fill(nhs_no)
125-
SubjectScreeningPage(self.page).nhs_number_filter.press("Tab")
126-
SubjectScreeningPage(self.page).select_search_area_option(
124+
subject_screening_page.click_demographics_filter()
125+
subject_screening_page.click_nhs_number_filter()
126+
subject_screening_page.nhs_number_filter.fill(nhs_no)
127+
subject_screening_page.nhs_number_filter.press("Tab")
128+
subject_screening_page.select_search_area_option(
127129
SearchAreaSearchOptions.SEARCH_AREA_WHOLE_DATABASE.value
128130
)
129-
SubjectScreeningPage(self.page).click_search_button()
131+
subject_screening_page.click_search_button()
130132
if postcode:
131133
SubjectDemographicPage(self.page).fill_postcode_input(postcode)
132134
if age:

0 commit comments

Comments
 (0)