Skip to content
Open
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
15 changes: 15 additions & 0 deletions pages/screening_subject_search/advance_episode_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,18 @@ def click_high_risk_findings_result_from_symptomatic_procedure_button(
def click_other_post_investigation_contact_required_button(self) -> None:
"""Click the 'Other Post Investigation Contact Required' button."""
self.safe_accept_dialog(self.other_post_investigation_contact_required_button)

def can_advance_episode(self, advance_option: str, can_or_cannot: bool) -> None:
"""
Asserted whether a subject's episode can be advanced using a specified option
Args:
advance_option (str): The advance episode option to check
can_or_cannot (bool): True if the option should be visible, False otherwise
Raises:
AssertionError: If the visibility of the option does not match the expected value
"""
advance_option_locator = self.page.get_by_role("button", name=advance_option)
if can_or_cannot:
assert advance_option_locator.is_visible()
else:
assert advance_option_locator.is_hidden()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from playwright.sync_api import Page
from pages.screening_subject_search.reopen_episode_page import ReopenEpisodePage


class ReopenLynchSurveillanceEpisodePage(ReopenEpisodePage):
"""Reopen Lynch Surveillance Episode Page locators, and methods for interacting with the page."""

def __init__(self, page: Page):
super().__init__(page)
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def __init__(self, page: Page):
self.reopen_surveillance_episode_button = self.page.get_by_role(
"button", name="Reopen Surveillance Episode"
)
self.reopen_lynch_surveillance_episode_button = self.page.get_by_role(
"button", name="Reopen Lynch Surveillance Episode"
)
self.reopen_for_correction_button = self.page.get_by_role(
"button", name="Reopen episode for correction"
)
Expand Down Expand Up @@ -465,6 +468,10 @@ def click_reopen_surveillance_episode_button(self) -> None:
"""Click on the 'Reopen Surveillance Episode' button"""
self.click(self.reopen_surveillance_episode_button)

def click_reopen_lynch_surveillance_episode_button(self) -> None:
"""Click on the 'Reopen Lynch Surveillance Episode' button"""
self.click(self.reopen_lynch_surveillance_episode_button)

def reopen_fobt_screening_episode(self) -> None:
"""
Reopen a previously closed FOBT screening episode, including confirmation modal.
Expand Down
Loading