Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ def __init__(self, page: Page):
self.record_other_post_investigation_contact_button = self.page.get_by_role(
"button", name="Record other post-"
)
self.enter_diagnostic_test_outcome_button = self.page.get_by_role(
"button", name="Enter Diagnostic Test Outcome"
)
self.handover_into_symptomatic_care_button = self.page.get_by_role(
"button", name="Handover into Symptomatic Care"
)
self.record_diagnosis_date_button = self.page.get_by_role(
"button", name="Record Diagnosis Date"
)

def click_suitable_for_endoscopic_test_button(self) -> None:
"""Click the 'Suitable for Endoscopic Test' button."""
Expand Down Expand Up @@ -78,3 +87,15 @@ def verify_latest_event_status_value(self, latest_event_status: str) -> None:
def click_record_other_post_investigation_contact_button(self) -> None:
"""Click the 'Record other post-investigation contact' button."""
self.click(self.record_other_post_investigation_contact_button)

def click_enter_diagnostic_test_outcome_button(self) -> None:
"""Click the 'Enter Diagnostic Test Outcome' button."""
self.click(self.enter_diagnostic_test_outcome_button)

def click_handover_into_symptomatic_care_button(self) -> None:
"""Click the 'Handover Into Symptomatic Care' button."""
self.click(self.handover_into_symptomatic_care_button)

def click_record_diagnosis_date_button(self) -> None:
"""Click the 'Record Diagnosis Date' button."""
self.click(self.record_diagnosis_date_button)
14 changes: 9 additions & 5 deletions tests/smokescreen/test_compartment_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
PolypInterventionDeviceOptions,
PolypInterventionExcisionTechniqueOptions,
)
from pages.screening_subject_search.advance_fobt_screening_episode_page import (
AdvanceFOBTScreeningEpisodePage,
)


# This should go into a util. Adding it here to avoid SonarQube duplication errors:
Expand Down Expand Up @@ -207,7 +210,8 @@ def after_high_risk_result(page: Page) -> None:

SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()
# The following code is on the advance fobt screening episode page
page.get_by_role("button", name="Enter Diagnostic Test Outcome").click()
AdvanceFOBTScreeningEpisodePage(page).click_enter_diagnostic_test_outcome_button()

# The following code is on the diagnostic test outcome page
expect(page.get_by_role("cell", name="High-risk findings").nth(1)).to_be_visible()
page.get_by_label("Outcome of Diagnostic Test").select_option("20365")
Expand All @@ -225,7 +229,7 @@ def after_lnpcp_result(page: Page) -> None:
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()

# The following code is on the advance fobt screening episode page
page.get_by_role("button", name="Enter Diagnostic Test Outcome").click()
AdvanceFOBTScreeningEpisodePage(page).click_enter_diagnostic_test_outcome_button()

# The following code is on the diagnostic test outcome page
expect(page.get_by_role("cell", name="LNPCP").nth(1)).to_be_visible()
Expand Down Expand Up @@ -314,7 +318,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()

# The following code is on the advance fobt screening episode page
page.get_by_role("button", name="Record Diagnosis Date").click()
AdvanceFOBTScreeningEpisodePage(page).click_record_diagnosis_date_button()

# The following code is on the record diagnosis date page
RecordDiagnosisDatePage(page).enter_date_in_diagnosis_date_field(datetime.today())
Expand Down Expand Up @@ -393,7 +397,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()

# The following code is on the advance fobt screening episode page
page.get_by_role("button", name="Enter Diagnostic Test Outcome").click()
AdvanceFOBTScreeningEpisodePage(page).click_enter_diagnostic_test_outcome_button()

# The following code is on the diagnostic test outcome page
expect(
Expand All @@ -408,7 +412,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
SubjectScreeningSummaryPage(page).click_advance_fobt_screening_episode_button()

# The following code is on the advance fobt screening episode page
page.get_by_role("button", name="Record Diagnosis Date").click()
AdvanceFOBTScreeningEpisodePage(page).click_record_diagnosis_date_button()

# The following code is on the record diagnosis date page
RecordDiagnosisDatePage(page).enter_date_in_diagnosis_date_field(datetime.today())
Expand Down