Skip to content

Commit 8c1e797

Browse files
As per PR # 110 comments, code change is implemented.
1 parent 9351e9a commit 8c1e797

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pages/screening_subject_search/subject_episode_events_and_notes_page.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest
33
from playwright.sync_api import Page, expect
44
from pages.base_page import BasePage
5-
5+
from typing import Dict
66

77
class SubjectEpisodeEventsAndNotesPage(BasePage):
88
"""Episode Events and Notes Page locators, and methods for interacting with the page."""
@@ -92,7 +92,7 @@ def is_record_diagnosis_date_option_available(self) -> bool:
9292
"button", name="Record Diagnosis Date"
9393
).is_visible()
9494
except Exception as e:
95-
logging.error(f"Error checking for 'Record Diagnosis Date' option: {e}")
95+
logging.error(f"Record Diagnosis Date option not found: {e}")
9696
return False
9797

9898
def is_amend_diagnosis_date_option_available(self) -> bool:
@@ -110,7 +110,7 @@ def is_amend_diagnosis_date_option_available(self) -> bool:
110110
logging.error(f"Error checking for 'Amend Diagnosis Date' option: {e}")
111111
return False
112112

113-
def process_sspi_update_for_death(self, deduction_reason: str):
113+
def process_sspi_update_for_death(self, deduction_reason: str) -> None:
114114
"""
115115
Submits an SSPI update for a death-related deduction reason through the UI workflow.
116116
@@ -126,15 +126,15 @@ def process_sspi_update_for_death(self, deduction_reason: str):
126126
self.deduction_reason_dropdown.select_option(label=deduction_reason)
127127
self.confirm_sspi_update_button.click()
128128

129-
def get_latest_episode_details(self):
129+
def get_latest_episode_details(self) -> Dict[str, str]:
130130
"""
131-
Retrieves details of the latest episode from the UI elements.
131+
Retrieve details of the latest episode from the UI elements.
132132
133133
Returns:
134-
dict: A dictionary containing:
135-
- 'latest_episode_status' (str): The status text of the latest episode.
136-
- 'latest_episode_has_diagnosis_date' (str): Indicator text of whether a diagnosis date is present.
137-
- 'latest_episode_diagnosis_date_reason' (str): Reason text explaining the diagnosis date status.
134+
Dict[str, str]: A dictionary containing:
135+
- 'latest_episode_status': The status text of the latest episode.
136+
- 'latest_episode_has_diagnosis_date': Indicator of whether a diagnosis date is present.
137+
- 'latest_episode_diagnosis_date_reason': Reason explaining the diagnosis date status.
138138
"""
139139
return {
140140
"latest_episode_status": self.latest_episode_status.inner_text(),

0 commit comments

Comments
 (0)