Skip to content

Commit 7713ece

Browse files
Altering pages/subject_screening_summary to have dropdown options in an Enum class
1 parent e90d836 commit 7713ece

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

pages/subject_screening_summary.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from playwright.sync_api import Page, expect, Locator
22
from utils.click_helper import click
3-
3+
from enum import Enum
44

55
class SubjectScreeningSummary:
66
def __init__(self, page: Page):
@@ -56,12 +56,6 @@ def click_patient_contacts(self)-> None:
5656
def click_more(self)-> None:
5757
click(self.page, self.more)
5858

59-
def select_change_screening_status(self)-> None:
60-
self.change_screening_status.select_option("4007")
61-
62-
def select_reason(self)-> None:
63-
self.reason.select_option("11314")
64-
6559
def click_update_subject_data(self)-> None:
6660
click(self.page, self.update_subject_data)
6761

@@ -73,3 +67,15 @@ def go_to_a_page_to_advance_the_episode(self)-> None:
7367

7468
def go_to_a_page_to_close_the_episode(self)-> None:
7569
click(self.page, self.go_to_a_page_to_close_the_episode)
70+
71+
def select_change_screening_status(self, option: str)-> None:
72+
self.change_screening_status.select_option(option)
73+
74+
def select_reason(self, option: str)-> None:
75+
self.reason.select_option(option)
76+
77+
class ChangeScreeningStatusOptions(Enum):
78+
SEEKING_FURTHER_DATA = "4007"
79+
80+
class ReasonOptions(Enum):
81+
UNCERTIFIED_DEATH = "11314"

utils/screening_subject_page_searcher.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66

77
def verify_subject_event_status_by_nhs_no(page: Page, nhs_no: str, latest_event_status: str)->None:
8+
"""
9+
This is used to check that the latest event status of a subject has been updated to what is expected
10+
We provide the NHS Number for the subject and the expected latest event status and it navigates to the correct page
11+
From here it searches for that subject against the whole database and verifies the latest event status is as expected
12+
"""
813
BasePage(page).click_main_menu_link()
914
BasePage(page).go_to_screening_subject_search_page()
1015
SubjectScreeningPage(page).click_nhs_number_filter()

0 commit comments

Comments
 (0)