Skip to content

Commit 7f8139d

Browse files
Fixed issues and spelling issues
1 parent 9f626e5 commit 7f8139d

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

pages/screening_subject_search/subject_screening_summary_page.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ def __init__(self, page: Page):
5656
"button", name="Advance FOBT Screening Episode"
5757
)
5858

59+
def wait_for_page_title(self) -> None:
60+
"""Waits for the page to be the Subject Screening Summary"""
61+
self.subject_screening_summary.wait_for()
62+
5963
def verify_result_contains_text(self, text) -> None:
6064
"""Verify that the result contains the given text."""
6165
expect(self.display_rs).to_contain_text(text)

tests/smokescreen/test_compartment_6.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
251251

252252
# This needs to be repeated for two subjects, one old and one not - High Risk Result
253253
# Older patient
254-
nhs_no = "9056553305"
254+
nhs_no = "9109877185"
255255
go_to_investigation_datasets_page(page, nhs_no)
256256

257257
# The following code is on the investigation datasets page
@@ -278,20 +278,21 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
278278
page.locator("#UI_NS_CONSULTANT_PIO_SELECT_LINK").click()
279279
option_locator = page.locator(
280280
'[value="201"]:visible'
281-
) # Here value '201' is refering to Consultant B, Frame
281+
) # Here value '201' is referring to Consultant B, Frame
282282
option_locator.wait_for(state="visible")
283283
option_locator.click()
284284
page.get_by_role("textbox", name="Notes").click()
285285
page.get_by_role("textbox", name="Notes").fill("Test Automation")
286286
page.once("dialog", lambda dialog: dialog.accept())
287287
page.get_by_role("button", name="Save").click()
288288

289+
SubjectScreeningSummaryPage(page).wait_for_page_title()
289290
SubjectScreeningSummaryPage(page).verify_latest_event_status_value(
290291
"A385 - Handover into Symptomatic Care"
291292
)
292293

293294
# Younger patient
294-
nhs_no = "9867208471"
295+
nhs_no = "9624131880"
295296
go_to_investigation_datasets_page(page, nhs_no)
296297

297298
# The following code is on the investigation datasets page
@@ -321,7 +322,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
321322

322323
# This needs to be repeated for two subjects, one old and one not - LNPCP Result
323324
# Older patient
324-
nhs_no = "9840013254"
325+
nhs_no = "9648064792"
325326
go_to_investigation_datasets_page(page, nhs_no)
326327

327328
# The following code is on the investigation datasets page
@@ -348,20 +349,21 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
348349
page.locator("#UI_NS_CONSULTANT_PIO_SELECT_LINK").click()
349350
option_locator = page.locator(
350351
'[value="201"]:visible'
351-
) # Here value '201' is refering to Consultant B, Frame
352+
) # Here value '201' is referring to Consultant B, Frame
352353
option_locator.wait_for(state="visible")
353354
option_locator.click()
354355
page.get_by_role("textbox", name="Notes").click()
355356
page.get_by_role("textbox", name="Notes").fill("Test Automation")
356357
page.once("dialog", lambda dialog: dialog.accept())
357358
page.get_by_role("button", name="Save").click()
358359

360+
SubjectScreeningSummaryPage(page).wait_for_page_title()
359361
SubjectScreeningSummaryPage(page).verify_latest_event_status_value(
360362
"A385 - Handover into Symptomatic Care"
361363
)
362364

363365
# Younger patient
364-
nhs_no = "9477527106"
366+
nhs_no = "9627060208"
365367
go_to_investigation_datasets_page(page, nhs_no)
366368

367369
# The following code is on the investigation datasets page
@@ -389,8 +391,8 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
389391
)
390392

391393
# This needs to be repeated for 1 subject, age does not matter - Normal Result
392-
nhs_no = "9936724968"
393-
go_to_investigation_datasets_page(page, nhs_no)
394+
nhs_no_normal = "9965184321"
395+
go_to_investigation_datasets_page(page, nhs_no_normal)
394396

395397
# The following code is on the investigation datasets page
396398
default_investigation_dataset_forms(page)
@@ -445,6 +447,11 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
445447
],
446448
)
447449

450+
# This is to check for the status of a normal subject as this NHS Number cannot be retrieved from the DB
451+
verify_subject_event_status_by_nhs_no(
452+
page, nhs_no_normal, "S61 - Normal (No Abnormalities Found)"
453+
)
454+
448455
batch_processing(
449456
page,
450457
"A385",

utils/batch_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def prepare_and_print_batch(
9292
page: Page, link_text: str, get_subjects_from_pdf: bool = False
9393
) -> pd.DataFrame | None:
9494
"""
95-
This prepares the batch, retreives the files and confirms them as printed
95+
This prepares the batch, retrieves the files and confirms them as printed
9696
Once those buttons have been pressed it waits for the message 'Batch Successfully Archived'
9797
9898
Args:

0 commit comments

Comments
 (0)