Skip to content

Commit 513bd3c

Browse files
addressing PR comments
1 parent 5b50345 commit 513bd3c

File tree

5 files changed

+17
-21
lines changed

5 files changed

+17
-21
lines changed

pages/screening_subject_search/advance_episode_page.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self, page: Page):
114114
"button",
115115
name="Refer Another Diagnostic Test after return from Symptomatic Referral",
116116
)
117-
self.refer_to_survelliance_after_symptomatic_referral_button = (
117+
self.refer_to_surveillance_after_symptomatic_referral_button = (
118118
self.page.get_by_role(
119119
"button", name="Refer to Surveillance after Symptomatic Referral"
120120
)
@@ -463,12 +463,12 @@ def click_lnpcp_result_from_symptomatic_procedure_button(self) -> None:
463463
"""Click the 'LNPCP Result from Symptomatic Procedure' button."""
464464
self.safe_accept_dialog(self.lnpcp_result_from_symptomatic_procedure_button)
465465

466-
def click_refer_to_survelliance_after_symptomatic_referral_button(
466+
def click_refer_to_surveillance_after_symptomatic_referral_button(
467467
self,
468468
) -> None:
469469
"""Click the 'Refer to Surveillance after Symptomatic Referral' button."""
470470
self.safe_accept_dialog(
471-
self.refer_to_survelliance_after_symptomatic_referral_button
471+
self.refer_to_surveillance_after_symptomatic_referral_button
472472
)
473473

474474
def click_redirect_to_rerecord_the_outcome_of_symptomatic_referral_button(

pages/screening_subject_search/discharge_from_surveillance_page.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from playwright.sync_api import Page, expect
1+
from playwright.sync_api import Page
22
from pages.base_page import BasePage
33
from datetime import datetime
44
from utils.calendar_picker import CalendarPicker
@@ -22,7 +22,7 @@ def __init__(self, page: Page):
2222
self.notes_field = self.page.locator("#UI_NOTES")
2323
self.save_button = self.page.get_by_role("button", name="Save")
2424

25-
def enter_date_decition_made(self, date: datetime) -> None:
25+
def enter_date_decision_made(self, date: datetime) -> None:
2626
"""
2727
Enter a date into the 'Date Decision Made' field
2828
Args:
@@ -73,9 +73,9 @@ def complete_discharge_from_surveillance_form(
7373
"""
7474
Completes the discharge from surveillance form.
7575
Args:
76-
include_screening_consultant (bool): Wether or not to include a screening consultant in the form
76+
include_screening_consultant (bool): Whether or not to include a screening consultant in the form
7777
"""
78-
self.enter_date_decition_made(datetime.today())
78+
self.enter_date_decision_made(datetime.today())
7979
if include_screening_consultant:
8080
self.select_screening_consultant_from_index(-1)
8181
self.select_screening_pracitioner_from_index(1)

tests/regression/regression_tests/fobt_regression_tests/test_fobt_scenario_14.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ def test_scenario_14(page: Page) -> None:
819819

820820
AdvanceFOBTScreeningEpisodePage(
821821
page
822-
).click_refer_to_survelliance_after_symptomatic_referral_button()
822+
).click_refer_to_surveillance_after_symptomatic_referral_button()
823823

824824
# Then my subject has been updated as follows:
825825
subject_assertion(
@@ -1009,7 +1009,7 @@ def test_scenario_14(page: Page) -> None:
10091009
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()
10101010
AdvanceFOBTScreeningEpisodePage(
10111011
page
1012-
).click_refer_to_survelliance_after_symptomatic_referral_button()
1012+
).click_refer_to_surveillance_after_symptomatic_referral_button()
10131013
# Then my subject has been updated as follows:
10141014
subject_assertion(
10151015
nhs_no,
@@ -1084,7 +1084,7 @@ def test_scenario_14(page: Page) -> None:
10841084
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()
10851085
AdvanceFOBTScreeningEpisodePage(
10861086
page
1087-
).click_refer_to_survelliance_after_symptomatic_referral_button()
1087+
).click_refer_to_surveillance_after_symptomatic_referral_button()
10881088
# Then my subject has been updated as follows:
10891089
subject_assertion(
10901090
nhs_no,

tests/regression/regression_tests/surveillance_regression_tests/test_surveillance_scenario_2.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def test_scenario_2(page: Page, general_properties: dict) -> None:
139139
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
140140

141141
# And I choose to book a practitioner clinic for my subject
142-
SubjectScreeningSummaryPage(page=page).click_book_practitioner_clinic_button()
142+
SubjectScreeningSummaryPage(page).click_book_practitioner_clinic_button()
143143

144144
# And I set the practitioner appointment date to "today"
145145
# And I book the earliest available post investigation appointment on this date
@@ -158,13 +158,6 @@ def test_scenario_2(page: Page, general_properties: dict) -> None:
158158
nhs_no, "X610", "Surveillance Appointment Invitation Letter", True
159159
)
160160

161-
# When I switch users to BCSS "England" as user role "Screening Centre Manager"
162-
LogoutPage(page).log_out(close_page=False)
163-
BasePage(page).go_to_log_in_page()
164-
user_role = UserTools.user_login(page, "Screening Centre Manager at BCS001", True)
165-
if user_role is None:
166-
raise ValueError("The current user cannot be assigned a user role")
167-
168161
# And I view the subject
169162
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
170163

utils/generate_health_check_forms_util.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from playwright.sync_api import Page
32
from pages.base_page import BasePage
43
from pages.surveillance.surveillance_page import SurveillancePage
@@ -28,11 +27,15 @@ def invite_surveillance_subjects_early(self, screening_centre_id: str) -> str:
2827
surveillance_due_count_date = ProduceHealthCheckFormsPage(
2928
self.page
3029
).return_surveillance_due_count_date_value()
31-
nhs_no = self.find_early_invite_subjects(screening_centre_id, surveillance_due_count_date)
30+
nhs_no = self.find_early_invite_subjects(
31+
screening_centre_id, surveillance_due_count_date
32+
)
3233
ProduceHealthCheckFormsPage(self.page).click_generate_healthcheck_forms_button()
3334
return nhs_no
3435

35-
def find_early_invite_subjects(self, screening_centre_id: str, surveillance_due_count_date: str) -> str:
36+
def find_early_invite_subjects(
37+
self, screening_centre_id: str, surveillance_due_count_date: str
38+
) -> str:
3639
"""
3740
Find an early invite subject for surveillance based on the surveillance due count date.
3841
Args:

0 commit comments

Comments
 (0)