Skip to content

Commit 9527f4e

Browse files
Feature/bcss 21318 fobtregressiontests scenario 15 (#149)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description <!-- Describe your changes in detail. --> Adding scenario 15 from FOBTRegressionTeests feature file ## Context <!-- Why is this change required? What problem does it solve? --> Adding scenario 15 from FOBTRegressionTeests feature file ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [x] Refactoring (non-breaking change) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I am familiar with the [contributing guidelines](https://github.com/nhs-england-tools/playwright-python-blueprint/blob/main/CONTRIBUTING.md) - [x] I have followed the code style of the project - [x] I have added tests to cover my changes (where appropriate) - [x] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent cea68c5 commit 9527f4e

File tree

11 files changed

+1162
-20
lines changed

11 files changed

+1162
-20
lines changed

investigation_dataset_ui.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
PolypInterventionRetrievedOptions,
4343
OpticalDiagnosisOptions,
4444
OpticalDiagnosisConfidenceOptions,
45+
PolypTypeLeftInSituOptions,
4546
)
4647

4748

@@ -90,6 +91,7 @@
9091
"ExtracolonicSummaryCodeOptions": ExtracolonicSummaryCodeOptions,
9192
"OpticalDiagnosisOptions": OpticalDiagnosisOptions,
9293
"OpticalDiagnosisConfidenceOptions": OpticalDiagnosisConfidenceOptions,
94+
"PolypTypeLeftInSituOptions": PolypTypeLeftInSituOptions,
9395
"PolypInterventionRetrievedOptions": PolypInterventionRetrievedOptions,
9496
}
9597

investigation_dataset_ui_app/dataset_fields.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@
290290
"field": "left in situ",
291291
"value": "YesNoOptions.YES"
292292
}
293+
},
294+
{
295+
"key": "polyp type left in situ",
296+
"type": "PolypTypeLeftInSituOptions",
297+
"description": "Polyp type that was left in situ",
298+
"optional": true,
299+
"conditional_on": {
300+
"field": "reason left in situ",
301+
"value": "PolypReasonLeftInSituOptions.POLYP_TYPE"
302+
}
293303
}
294304
],
295305
"list": true

pages/datasets/investigation_dataset_page.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,13 @@ class OpticalDiagnosisConfidenceOptions(StrEnum):
16781678
LOW = "305746"
16791679

16801680

1681+
class PolypTypeLeftInSituOptions(StrEnum):
1682+
"""Enum for Polyp Type Left in Situ options"""
1683+
1684+
INFLAMMATORY_POLYP = "17300~Sub Type Not Applicable"
1685+
LYMPHOID_FOLLICLE = "200599~Sub Type Not Applicable"
1686+
1687+
16811688
# Registry of all known Enums to search when matching string values
16821689
ALL_ENUMS: List[type[Enum]] = [
16831690
obj

pages/screening_subject_search/advance_fobt_screening_episode_page.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ def __init__(self, page: Page):
125125
name="Redirect to Re-record the Outcome of Symptomatic Referral",
126126
)
127127
)
128+
self.redirect_to_establish_suitability_for_diagnostic_tests_button = (
129+
self.page.get_by_role(
130+
"button",
131+
name="Redirect to Establish Suitability for Diagnostic Tests",
132+
)
133+
)
128134
# Contact recording locators
129135
self.contact_direction_dropdown = self.page.get_by_label("Contact Direction")
130136
self.contact_made_between_dropdown = self.page.get_by_label(
@@ -464,6 +470,18 @@ def click_refer_to_survelliance_after_symptomatic_referral_button(
464470
self.refer_to_survelliance_after_symptomatic_referral_button
465471
)
466472

467-
def click_redirect_to_rerecord_the_outcome_of_symptomatic_referral_button(self) -> None:
473+
def click_redirect_to_rerecord_the_outcome_of_symptomatic_referral_button(
474+
self,
475+
) -> None:
468476
"""Click the 'Redirect to Re-record the Outcome of Symptomatic Referral' button."""
469-
self.safe_accept_dialog(self.redirect_to_rerecord_the_outcome_of_symptomatic_referral_button)
477+
self.safe_accept_dialog(
478+
self.redirect_to_rerecord_the_outcome_of_symptomatic_referral_button
479+
)
480+
481+
def click_redirect_to_establish_suitability_for_diagnostic_tests_button(
482+
self,
483+
) -> None:
484+
"""Click the 'Redirect to Establish Suitability for Diagnostic Tests' button"""
485+
self.safe_accept_dialog(
486+
self.redirect_to_establish_suitability_for_diagnostic_tests_button
487+
)

pages/screening_subject_search/diagnostic_test_outcome_page.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,27 @@
66

77

88
class ReferralProcedureType(StrEnum):
9+
"""Enum class referral procedure type options"""
10+
911
ENDOSCOPIC = "20356"
1012
RADIOLOGICAL = "20357"
1113

1214

1315
class ReasonForOnwardReferral(StrEnum):
16+
"""Enum class containing reason for onward referral options"""
17+
1418
CURRENTLY_UNSUITABLE_FOR_ENDOSCOPIC_REFERRAL = "20358"
1519
FURTHER_CLINICAL_ASSESSMENT = "20359"
1620
INCOMPLETE_COLONIC_VISUALISATION = "20481"
1721
POLYP_EXCISION = "203011"
1822
CORRECTIVE_SURGERY = "203012"
1923
SUSPECTED_CANCER_SURGERY = "203013"
24+
POLYP_NOT_FULLY_EXCISED = "20321"
25+
CHECK_POLYP_SITE = "20322"
26+
MULTIPLE_POLYPS_NOT_ALL_REMOVED = "20323"
27+
HISTOLOGY_REQUIRED = "20324"
28+
UNEXPLAINED_SYMPTOMS = "20325"
29+
INTERVENTIONS_REQUIRED = "20326"
2030

2131

2232
class DiagnosticTestOutcomePage(BasePage):

tests/regression/regression_tests/fobt_regression_tests/test_scenario_13.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def test_scenario_13(page: Page) -> None:
134134
"subject age": "Between 60 and 72",
135135
"subject has unprocessed sspi updates": "No",
136136
"subject has user dob updates": "No",
137+
"subject hub code": "User's hub",
137138
}
138139

139140
query, bind_vars = SubjectSelectionQueryBuilder().build_subject_selection_query(

tests/regression/regression_tests/fobt_regression_tests/test_scenario_14.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import logging
33
from datetime import datetime, timedelta
44
from playwright.sync_api import Page
5-
from classes.subject import subject
65
from classes.subject.subject import Subject
76
from classes.user.user import User
8-
from pages.screening_subject_search import refer_to_mdt_page
97
from pages.screening_subject_search.non_neoplastic_result_from_symptomatic_procedure_page import (
108
NonNeoplasticResultFromSymptomaticProcedurePage,
119
)
@@ -74,14 +72,10 @@
7472
PolypExcisionCompleteOptions,
7573
PolypDysplasiaOptions,
7674
YesNoUncertainOptions,
77-
ReasonPathologyLostOptions,
7875
)
7976
from pages.screening_subject_search.reopen_fobt_screening_episode_page import (
8077
ReopenFOBTScreeningEpisodePage,
8178
)
82-
from pages.screening_subject_search.contact_with_patient_page import (
83-
ContactWithPatientPage,
84-
)
8579
from pages.screening_subject_search.refer_to_mdt_page import ReferToMDTPage
8680
from pages.screening_subject_search.lnpcp_result_from_symptomatic_procedure_page import (
8781
LnpcpResultFromSymptomaticProcedure,
@@ -90,11 +84,8 @@
9084
HandoverIntoSymptomaticCarePage,
9185
)
9286
from classes.repositories.person_repository import PersonRepository
93-
from classes.repositories.episode_repository import EpisodeRepository
9487
from utils.sspi_change_steps import SSPIChangeSteps
9588
from pages.organisations.organisations_page import OrganisationSwitchPage
96-
from utils.call_and_recall_utils import CallAndRecallUtils
97-
from utils.oracle.subject_creation_util import CreateSubjectSteps
9889
from classes.repositories.subject_repository import SubjectRepository
9990

10091

0 commit comments

Comments
 (0)