1010from pages .logout .log_out_page import LogoutPage
1111from pages .datasets .subject_datasets_page import SubjectDatasetsPage
1212from pages .screening_subject_search .handover_into_symptomatic_care_page import (
13- HandoverIntoSymptomaticCarePage
13+ HandoverIntoSymptomaticCarePage ,
1414)
1515from utils .calendar_picker import CalendarPicker
1616from datetime import datetime
1717from pages .screening_subject_search .record_diagnosis_date_page import (
1818 RecordDiagnosisDatePage ,
1919)
2020from pages .screening_subject_search .diagnostic_test_outcome_page import (
21- DiagnosticTestOutcomePage ,OutcomeOfDiagnosticTest
21+ DiagnosticTestOutcomePage ,
22+ OutcomeOfDiagnosticTest ,
2223)
24+ from pages .datasets .subject_datasets_page import SubjectDatasetsPage
2325from pages .datasets .investigation_dataset_page import (
2426 InvestigationDatasetsPage ,
2527 SiteLookupOptions ,
@@ -232,7 +234,7 @@ def after_high_risk_result(page: Page) -> None:
232234 BasePage (page ).click_back_button ()
233235
234236 # The following code is on the subject datasets page
235- expect (page . get_by_text ( "** Completed **" ). nth ( 1 )). to_be_visible ()
237+ SubjectDatasetsPage (page ). check_investigation_dataset_complete ()
236238 BasePage (page ).click_back_button ()
237239
238240 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -241,15 +243,18 @@ def after_high_risk_result(page: Page) -> None:
241243
242244 # The following code is on the diagnostic test outcome page
243245 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome ("High-risk findings" )
244- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .REFER_SURVEILLANCE )
246+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
247+ OutcomeOfDiagnosticTest .REFER_SURVEILLANCE
248+ )
245249 DiagnosticTestOutcomePage (page ).click_save_button ()
246250
251+
247252def after_lnpcp_result (page : Page ) -> None :
248253 InvestigationDatasetsPage (page ).expect_text_to_be_visible ("LNPCP" )
249254 BasePage (page ).click_back_button ()
250255
251256 # The following code is on the subject datasets page
252- expect (page . get_by_text ( "** Completed **" ). nth ( 1 )). to_be_visible ()
257+ SubjectDatasetsPage (page ). check_investigation_dataset_complete ()
253258 BasePage (page ).click_back_button ()
254259
255260 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -259,9 +264,12 @@ def after_lnpcp_result(page: Page) -> None:
259264
260265 # The following code is on the diagnostic test outcome page
261266 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome ("LNPCP" )
262- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .REFER_SURVEILLANCE )
267+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
268+ OutcomeOfDiagnosticTest .REFER_SURVEILLANCE
269+ )
263270 DiagnosticTestOutcomePage (page ).click_save_button ()
264271
272+
265273def handover_subject_to_symptomatic_care (page : Page ) -> None :
266274 SubjectScreeningSummaryPage (page ).verify_latest_event_status_value (
267275 "A394 - Handover into Symptomatic Care for Surveillance - Patient Age"
@@ -303,7 +311,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
303311
304312 # This needs to be repeated for two subjects, one old and one not - High Risk Result
305313 # Older patient
306- nhs_no = "9772286785 "
314+ nhs_no = "9707238623 "
307315 go_to_investigation_datasets_page (page , nhs_no )
308316
309317 # The following code is on the investigation datasets page
@@ -318,7 +326,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
318326 handover_subject_to_symptomatic_care (page )
319327
320328 # Younger patient
321- nhs_no = "9802397318 "
329+ nhs_no = "9526262042 "
322330 go_to_investigation_datasets_page (page , nhs_no )
323331
324332 # The following code is on the investigation datasets page
@@ -348,7 +356,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
348356
349357 # This needs to be repeated for two subjects, one old and one not - LNPCP Result
350358 # Older patient
351- nhs_no = "9359523194 "
359+ nhs_no = "9764755232 "
352360 go_to_investigation_datasets_page (page , nhs_no )
353361
354362 # The following code is on the investigation datasets page
@@ -363,7 +371,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
363371 handover_subject_to_symptomatic_care (page )
364372
365373 # Younger patient
366- nhs_no = "9828941813 "
374+ nhs_no = "9680451623 "
367375 go_to_investigation_datasets_page (page , nhs_no )
368376
369377 # The following code is on the investigation datasets page
@@ -391,7 +399,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
391399 )
392400
393401 # This needs to be repeated for 1 subject, age does not matter - Normal Result
394- nhs_no_normal = "9852356488 "
402+ nhs_no_normal = "9823638365 "
395403 go_to_investigation_datasets_page (page , nhs_no_normal )
396404
397405 # The following code is on the investigation datasets page
@@ -409,7 +417,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
409417 BasePage (page ).click_back_button ()
410418
411419 # The following code is on the subject datasets page
412- expect (page . get_by_text ( "** Completed **" ). nth ( 1 )). to_be_visible ()
420+ SubjectDatasetsPage (page ). check_investigation_dataset_complete ()
413421 BasePage (page ).click_back_button ()
414422
415423 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -421,7 +429,9 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
421429 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome (
422430 "Normal (No Abnormalities"
423431 )
424- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .INVESTIGATION_COMPLETE )
432+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
433+ OutcomeOfDiagnosticTest .INVESTIGATION_COMPLETE
434+ )
425435 DiagnosticTestOutcomePage (page ).click_save_button ()
426436
427437 SubjectScreeningSummaryPage (page ).verify_latest_event_status_value (
0 commit comments