Skip to content

Commit 522f76b

Browse files
committed
correcting formatting errors
1 parent e438c08 commit 522f76b

File tree

4 files changed

+31
-24
lines changed

4 files changed

+31
-24
lines changed

pages/base_page.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ def safe_accept_dialog(self, locator: Locator) -> None:
249249
except Exception as e:
250250
logging.error(f"Click failed: {e}")
251251

252-
253252
def assert_dialog_text(self, expected_text: str) -> None:
254253
"""
255254
Asserts that a dialog appears and contains the expected text.
@@ -280,5 +279,4 @@ def safe_accept_dialog_select_option(self, locator: Locator, option: str) -> Non
280279
try:
281280
locator.select_option(option)
282281
except Exception as e:
283-
logging.error(f"Option selection failed: {e}")
284-
282+
logging.error(f"Option selection failed: {e}")

pages/screening_subject_search/subject_events_notes.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ def get_title_and_note_from_row(self, row_number: int = 0) -> dict:
106106
"""
107107
Extracts title and note from a specific row's 'Notes' column using dynamic column index.
108108
"""
109-
cell_text= self.table_utils.get_cell_value("Notes", row_number)
109+
cell_text = self.table_utils.get_cell_value("Notes", row_number)
110110
lines = cell_text.split("\n\n")
111111
title = lines[0].strip() if len(lines) > 0 else ""
112112
note = lines[1].strip() if len(lines) > 1 else ""
113-
logging.info(f"Extracted title: '{title}' and note: '{note}' from row {row_number}")
113+
logging.info(
114+
f"Extracted title: '{title}' and note: '{note}' from row {row_number}"
115+
)
114116
return {"title": title, "note": note}
115117

116118

@@ -134,7 +136,7 @@ class NotesOptions(StrEnum):
134136
SUBJECT_NOTE = "4111"
135137
KIT_NOTE = "308015"
136138
ADDITIONAL_CARE_NOTE = "4112"
137-
EPISODE_NOTE= "4110"
139+
EPISODE_NOTE = "4110"
138140

139141

140142
class NotesStatusOptions(StrEnum):

pages/screening_subject_search/subject_screening_summary_page.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ def verify_subject_search_results_title_subject_screening_summary(self) -> None:
7272

7373
def verify_subject_search_results_title_subject_search_results(self) -> None:
7474
"""Verify that the subject search results title contains 'Subject Search Results'."""
75-
self.bowel_cancer_screening_page_title_contains_text(
76-
"Subject Search Results"
77-
)
75+
self.bowel_cancer_screening_page_title_contains_text("Subject Search Results")
7876

7977
def get_latest_event_status_cell(self, latest_event_status: str) -> Locator:
8078
"""Get the latest event status cell by its name."""
@@ -208,25 +206,34 @@ def verify_note_link_present(self, note_type_name: str) -> None:
208206
AssertionError: If the link is not visible on the page.
209207
"""
210208
logging.info(f"Checking if the '{note_type_name}' link is visible.")
211-
note_link_locator = self.page.get_by_role("link", name=f"({note_type_name})") # Dynamic locator for the note type link
212-
assert note_link_locator.is_visible(), f"'{note_type_name}' link is not visible, but it should be."
213-
logging.info(f"Verified: '{note_type_name}' link is visible.")
209+
note_link_locator = self.page.get_by_role(
210+
"link", name=f"({note_type_name})"
211+
) # Dynamic locator for the note type link
212+
assert (
213+
note_link_locator.is_visible()
214+
), f"'{note_type_name}' link is not visible, but it should be."
215+
logging.info(f"Verified: '{note_type_name}' link is visible.")
214216

215217
def verify_note_link_not_present(self, note_type_name: str) -> None:
216218
"""
217-
Verifies that the link for the specified note type is not visible on the page.
219+
Verifies that the link for the specified note type is not visible on the page.
218220
219-
Args:
220-
note_type_name (str): The name of the note type to check (e.g., 'Additional Care Note', 'Episode Note').
221+
Args:
222+
note_type_name (str): The name of the note type to check (e.g., 'Additional Care Note', 'Episode Note').
221223
222-
Raises:
223-
AssertionError: If the link is visible on the page.
224-
"""
224+
Raises:
225+
AssertionError: If the link is visible on the page.
226+
"""
225227
logging.info(f"Checking if the '{note_type_name}' link is not visible.")
226-
note_link_locator = self.page.get_by_role("link", name=f"({note_type_name})") # Dynamic locator for the note type link
227-
assert not note_link_locator.is_visible(), f"'{note_type_name}' link is visible, but it should not be."
228+
note_link_locator = self.page.get_by_role(
229+
"link", name=f"({note_type_name})"
230+
) # Dynamic locator for the note type link
231+
assert (
232+
not note_link_locator.is_visible()
233+
), f"'{note_type_name}' link is visible, but it should not be."
228234
logging.info(f"Verified: '{note_type_name}' link is not visible.")
229235

236+
230237
class ChangeScreeningStatusOptions(Enum):
231238
"""Enum for Change Screening Status options."""
232239

utils/oracle/oracle_specific_functions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,15 @@ def get_subjects_with_multiple_notes(note_type: int) -> pd.DataFrame:
517517
SELECT COUNT(sn.screening_subject_id)
518518
FROM supporting_notes_t sn
519519
WHERE sn.screening_subject_id = ss.screening_subject_id
520-
AND sn.type_id = :note_type
521-
AND sn.status_id = 4100
520+
AND sn.type_id = :note_type
521+
AND sn.status_id = 4100
522522
GROUP BY sn.screening_subject_id
523523
)
524524
AND 200 > (SELECT COUNT(sn.screening_subject_id)
525525
FROM supporting_notes_t sn
526526
WHERE sn.screening_subject_id = ss.screening_subject_id
527-
AND sn.type_id = :note_type
528-
AND sn.status_id = 4100
527+
AND sn.type_id = :note_type
528+
AND sn.status_id = 4100
529529
GROUP BY sn.screening_subject_id
530530
)
531531
AND ROWNUM = 1

0 commit comments

Comments
 (0)