|
8 | 8 | from pages.screening_subject_search.subject_screening_summary import ( |
9 | 9 | SubjectScreeningSummary, |
10 | 10 | ) |
| 11 | + |
| 12 | +from pages.screening_subject_search.contact_with_patient_page import ( |
| 13 | + ContactWithPatientPage, |
| 14 | +) |
| 15 | + |
11 | 16 | from utils.user_tools import UserTools |
12 | 17 | from utils.load_properties_file import PropertiesFile |
13 | 18 | from utils.screening_subject_page_searcher import verify_subject_event_status_by_nhs_no |
@@ -159,20 +164,37 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None: |
159 | 164 | # 'End Time', 12:00 |
160 | 165 | # 'Discussion Record' TEST AUTOMATION |
161 | 166 | # select 'Outcome' - 'Post-investigation Appointment Not Required' and click 'Save' |
162 | | - page.locator("#UI_DIRECTION").select_option(label="To patient") |
163 | | - page.locator("#UI_CALLER_ID").select_option(index=0) |
164 | | - page.get_by_role("button", name="Calendar").click() |
165 | | - CalendarPicker(page).v1_calender_picker(datetime.today()) |
166 | | - page.locator("#UI_START_TIME").click() |
167 | | - page.locator("#UI_START_TIME").fill("11:00") |
168 | | - page.locator("#UI_END_TIME").click() |
169 | | - page.locator("#UI_END_TIME").fill("12:00") |
170 | | - page.locator("#UI_COMMENT_ID").click() |
171 | | - page.locator("#UI_COMMENT_ID").fill("Test Automation") |
172 | | - page.locator("#UI_OUTCOME").select_option( |
173 | | - label="Post-investigation Appointment Not Required" |
| 167 | + |
| 168 | + ContactWithPatientPage(page).select_direction_dropdown_option( |
| 169 | + smokescreen_properties["c5_eng_direction1","c5_eng_direction2"] |
174 | 170 | ) |
175 | | - page.get_by_role("button", name="Save").click() |
| 171 | + ContactWithPatientPage(page).select_callerid_dropdown_option( |
| 172 | + smokescreen_properties["c5_eng_callerid"] |
| 173 | + ) |
| 174 | + ContactWithPatientPage(page).click_calendar_button() |
| 175 | + CalendarPicker(page).select_day(datetime.today()) |
| 176 | + ContactWithPatientPage(page).enter_start_time("11:00") |
| 177 | + ContactWithPatientPage(page).enter_end_time("12:00") |
| 178 | + ContactWithPatientPage(page).enter_discussion_record_text("Test Automation") |
| 179 | + ContactWithPatientPage(page).select_outcome_dropdown_option( |
| 180 | + smokescreen_properties["c5_eng_outcome1","c5_eng_outcome2"] |
| 181 | + ) |
| 182 | + ContactWithPatientPage(page).click_save_button() |
| 183 | + |
| 184 | + #page.locator("#UI_DIRECTION").select_option(label="To patient") |
| 185 | + #page.locator("#UI_CALLER_ID").select_option(index=0) |
| 186 | + #page.get_by_role("button", name="Calendar").click() |
| 187 | + #CalendarPicker(page).v1_calender_picker(datetime.today()) |
| 188 | + #page.locator("#UI_START_TIME").click() |
| 189 | + #page.locator("#UI_START_TIME").fill("11:00") |
| 190 | + #page.locator("#UI_END_TIME").click() |
| 191 | + #page.locator("#UI_END_TIME").fill("12:00") |
| 192 | + #page.locator("#UI_COMMENT_ID").click() |
| 193 | + #page.locator("#UI_COMMENT_ID").fill("Test Automation") |
| 194 | + #page.locator("#UI_OUTCOME").select_option( |
| 195 | + #label="Post-investigation Appointment Not Required" |
| 196 | + #) |
| 197 | + #page.get_by_role("button", name="Save").click() |
176 | 198 |
|
177 | 199 | verify_subject_event_status_by_nhs_no( |
178 | 200 | page, nhs_no, "A361 - Other Post-investigation Contact Required" |
|
0 commit comments