Skip to content

Commit bf4ac09

Browse files
Added POM code for handover into symptomatic care page.
1 parent 7596eea commit bf4ac09

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

tests/smokescreen/test_compartment_6.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,12 @@ def handover_subject_to_symptomatic_care(page: Page) -> None:
248248
page.get_by_role("button", name="Handover into Symptomatic Care").click()
249249

250250
# The following code is on the handover into symptomatic care page
251-
page.get_by_label("Referral").select_option("20445")
252-
page.get_by_role("button", name="Calendar").click()
251+
HandoverIntoSymptomaticCarePage(page).select_referral_dropdown_option("20445")
252+
HandoverIntoSymptomaticCarePage(page).click_calendar_button()
253253
CalendarPicker(page).v1_calender_picker(datetime.today())
254-
page.locator("#UI_NS_CONSULTANT_PIO_SELECT_LINK").click()
255-
option_locator = page.locator(
256-
'[value="201"]:visible'
257-
) # Here value '201' is referring to Consultant B, Frame
258-
option_locator.wait_for(state="visible")
259-
option_locator.click()
260-
page.get_by_role("textbox", name="Notes").click()
261-
page.get_by_role("textbox", name="Notes").fill("Test Automation")
262-
page.once("dialog", lambda dialog: dialog.accept())
263-
page.get_by_role("button", name="Save").click()
254+
HandoverIntoSymptomaticCarePage(page).select_consultant("201")
255+
HandoverIntoSymptomaticCarePage(page).fill_notes("Test Automation")
256+
HandoverIntoSymptomaticCarePage(page).click_save_button()
264257

265258
SubjectScreeningSummaryPage(page).wait_for_page_title()
266259
SubjectScreeningSummaryPage(page).verify_latest_event_status_value(

0 commit comments

Comments
 (0)