Skip to content

Commit d6bdeed

Browse files
Changing dialog dismiss to dialog accept
1 parent e75a1f0 commit d6bdeed

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/smokescreen/test_compartment_5.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
5252

5353
page.get_by_role("button", name="View appointments on this day").click()
5454
page.get_by_role("button", name="Calendar").click()
55-
date_from_util = datetime(2025, 4, 25)
55+
date_from_util = datetime(2025, 4, 28)
5656
CalendarPicker(page).v1_calender_picker(date_from_util)
5757

5858
# Select subject from inital test data util
59-
page.get_by_role("link", name="SCALDING COD").click()
59+
page.get_by_role("link", name="HAT-PIN UNTRUTH").click()
6060

6161
# Select Attendance radio button, tick Attended checkbox, set Attended Date to yesterday's (system) date and then press Save
6262
page.get_by_role("radio", name="Attendance").check()
@@ -69,7 +69,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
6969
# Repeat for x Abnormal patients
7070

7171
# Navigate to the 'Subject Screening Summary' screen for the 1st Abnormal patient
72-
nhs_no = "9934032236" # Test NHS NO for Scaliding Cod
72+
nhs_no = "9543076472" # Test NHS NO for Scaliding Cod
7373
verify_subject_event_status_by_nhs_no(
7474
page, nhs_no, "J10 - Attended Colonoscopy Assessment Appointment"
7575
)
@@ -101,7 +101,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
101101
# On the Subject Screening Summary click on the 'Advance FOBT Screening Episode' button and then click on the 'Suitable for Endoscopic Test' button
102102
# Click OK after message
103103
page.get_by_role("button", name="Advance FOBT Screening Episode").click()
104-
page.once("dialog", lambda dialog: dialog.dismiss())
104+
page.once("dialog", lambda dialog: dialog.accept())
105105
page.get_by_role("button", name="Suitable for Endoscopic Test").click()
106106

107107
# Enter a 'First Offered Appointment Date' (enter a date after the attended appt)
@@ -113,7 +113,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
113113

114114
# Click the 'Invite for Diagnostic Test >>' button
115115
# Click 'OK'
116-
page.once("dialog", lambda dialog: dialog.dismiss())
116+
page.once("dialog", lambda dialog: dialog.accept())
117117
page.get_by_role("button", name="Invite for Diagnostic Test >>").click()
118118
SubjectScreeningSummary(page).verify_latest_event_status_value(
119119
"A59 - Invited for Diagnostic Test"
@@ -140,7 +140,7 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
140140

141141
# Click 'Other Post-investigation Contact Required' button
142142
# Click 'OK'
143-
page.once("dialog", lambda dialog: dialog.dismiss())
143+
page.once("dialog", lambda dialog: dialog.accept())
144144
page.get_by_role("button", name="Other Post-investigation").click()
145145
expect(
146146
page.get_by_role(
@@ -176,6 +176,9 @@ def test_compartment_5(page: Page, smokescreen_properties: dict) -> None:
176176

177177
# Click 'Back' link
178178
BasePage(page).click_back_button()
179+
verify_subject_event_status_by_nhs_no(
180+
page, nhs_no, "A361 - Other Post-investigation Contact Required"
181+
)
179182
BasePage(page).click_back_button()
180183
# This brings you back to the subject search criteria page
181184

0 commit comments

Comments
 (0)