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 ,
@@ -211,7 +213,7 @@ def after_high_risk_result(page: Page) -> None:
211213 BasePage (page ).click_back_button ()
212214
213215 # The following code is on the subject datasets page
214- expect (page . get_by_text ("** Completed **" ). nth ( 1 )). to_be_visible ( )
216+ SubjectDatasetsPage (page ). expect_text_to_be_visible ("** Completed **" )
215217 BasePage (page ).click_back_button ()
216218
217219 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -220,15 +222,18 @@ def after_high_risk_result(page: Page) -> None:
220222
221223 # The following code is on the diagnostic test outcome page
222224 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome ("High-risk findings" )
223- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .REFER_SURVEILLANCE )
225+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
226+ OutcomeOfDiagnosticTest .REFER_SURVEILLANCE
227+ )
224228 DiagnosticTestOutcomePage (page ).click_save_button ()
225229
230+
226231def after_lnpcp_result (page : Page ) -> None :
227232 InvestigationDatasetsPage (page ).expect_text_to_be_visible ("LNPCP" )
228233 BasePage (page ).click_back_button ()
229234
230235 # The following code is on the subject datasets page
231- expect (page . get_by_text ("** Completed **" ). nth ( 1 )). to_be_visible ( )
236+ SubjectDatasetsPage (page ). expect_text_to_be_visible ("** Completed **" )
232237 BasePage (page ).click_back_button ()
233238
234239 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -238,9 +243,12 @@ def after_lnpcp_result(page: Page) -> None:
238243
239244 # The following code is on the diagnostic test outcome page
240245 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome ("LNPCP" )
241- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .REFER_SURVEILLANCE )
246+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
247+ OutcomeOfDiagnosticTest .REFER_SURVEILLANCE
248+ )
242249 DiagnosticTestOutcomePage (page ).click_save_button ()
243250
251+
244252def handover_subject_to_symptomatic_care (page : Page ) -> None :
245253 SubjectScreeningSummaryPage (page ).verify_latest_event_status_value (
246254 "A394 - Handover into Symptomatic Care for Surveillance - Patient Age"
@@ -282,7 +290,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
282290
283291 # This needs to be repeated for two subjects, one old and one not - High Risk Result
284292 # Older patient
285- nhs_no = "9772286785 "
293+ nhs_no = "9730614296 "
286294 go_to_investigation_datasets_page (page , nhs_no )
287295
288296 # The following code is on the investigation datasets page
@@ -297,7 +305,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
297305 handover_subject_to_symptomatic_care (page )
298306
299307 # Younger patient
300- nhs_no = "9802397318 "
308+ nhs_no = "9711391848 "
301309 go_to_investigation_datasets_page (page , nhs_no )
302310
303311 # The following code is on the investigation datasets page
@@ -327,7 +335,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
327335
328336 # This needs to be repeated for two subjects, one old and one not - LNPCP Result
329337 # Older patient
330- nhs_no = "9359523194 "
338+ nhs_no = "9468743977 "
331339 go_to_investigation_datasets_page (page , nhs_no )
332340
333341 # The following code is on the investigation datasets page
@@ -342,7 +350,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
342350 handover_subject_to_symptomatic_care (page )
343351
344352 # Younger patient
345- nhs_no = "9828941813 "
353+ nhs_no = "9724560430 "
346354 go_to_investigation_datasets_page (page , nhs_no )
347355
348356 # The following code is on the investigation datasets page
@@ -370,7 +378,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
370378 )
371379
372380 # This needs to be repeated for 1 subject, age does not matter - Normal Result
373- nhs_no_normal = "9852356488 "
381+ nhs_no_normal = "9808363938 "
374382 go_to_investigation_datasets_page (page , nhs_no_normal )
375383
376384 # The following code is on the investigation datasets page
@@ -388,7 +396,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
388396 BasePage (page ).click_back_button ()
389397
390398 # The following code is on the subject datasets page
391- expect (page . get_by_text ("** Completed **" ). nth ( 1 )). to_be_visible ( )
399+ SubjectDatasetsPage (page ). expect_text_to_be_visible ("** Completed **" )
392400 BasePage (page ).click_back_button ()
393401
394402 SubjectScreeningSummaryPage (page ).click_advance_fobt_screening_episode_button ()
@@ -400,7 +408,9 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
400408 DiagnosticTestOutcomePage (page ).verify_diagnostic_test_outcome (
401409 "Normal (No Abnormalities"
402410 )
403- DiagnosticTestOutcomePage (page ).select_test_outcome_option (OutcomeOfDiagnosticTest .INVESTIGATION_COMPLETE )
411+ DiagnosticTestOutcomePage (page ).select_test_outcome_option (
412+ OutcomeOfDiagnosticTest .INVESTIGATION_COMPLETE
413+ )
404414 DiagnosticTestOutcomePage (page ).click_save_button ()
405415
406416 SubjectScreeningSummaryPage (page ).verify_latest_event_status_value (
0 commit comments