22from playwright .sync_api import Page
33from my_pages import *
44from utils .batch_processing import batch_processing
5- from utils .oracle import OracleDB
65
76@pytest .mark .smoke
87@pytest .mark .compartment1
98def test_create_invitations_plan (page : Page ) -> None :
9+ """
10+ This is used to create the invitations plan. As it is not always needed it is separate to the main Compartment 1 function
11+ """
1012 logging .info ("Compartment 1 - Create Invitations Plan" )
1113 UserTools .user_login (page , "Hub Manager State Registered" )
1214 # Create plan - England
@@ -29,6 +31,13 @@ def test_create_invitations_plan(page: Page) -> None:
2931@pytest .mark .smokescreen
3032@pytest .mark .compartment1
3133def test_compartment_1 (page : Page ) -> None :
34+ """
35+ This is the main compartment 1 function. It covers the following:
36+ - Generating invitations based on the invitation plan
37+ - Processes S1 (FIT) batches
38+ - Processes S9 (FIT) batches
39+ - Processes S10 (FIT) batches
40+ """
3241 logging .info ("Compartment 1 - Generate Invitations" )
3342 UserTools .user_login (page , "Hub Manager State Registered" )
3443
@@ -42,20 +51,18 @@ def test_compartment_1(page: Page) -> None:
4251 # Print the batch of Pre-Invitation Letters - England
4352 logging .info ("Compartment 1 - Process S1 Batch" )
4453 if self_referrals_available :
45- batch_processing (page , "S1" , "Pre-invitation (FIT) (digital leaflet)" , "S9 - Pre-invitation Sent" )
54+ batch_processing (page , "S1" , "Pre-invitation (FIT) (digital leaflet)" , "S9 - Pre-invitation Sent" , False )
4655 else :
4756 logging .warning ("Skipping S1 Pre-invitation (FIT) (digital leaflet) as no self referral invitations were generated" )
48- nhs_number_df = batch_processing (page , "S1" , "Pre-invitation (FIT)" , "S9 - Pre-invitation Sent" )
49- OracleDB ().exec_bcss_timed_events (nhs_number_df )
57+ batch_processing (page , "S1" , "Pre-invitation (FIT)" , "S9 - Pre-invitation Sent" , True )
5058
5159 # Print the batch of Invitation & Test Kit Letters - England
5260 logging .info ("Compartment 1 - Process S9 Batch" )
53- nhs_number_df = batch_processing (page , "S9" , "Invitation & Test Kit (FIT)" , "S10 - Invitation & Test Kit Sent" )
54- OracleDB ().exec_bcss_timed_events (nhs_number_df )
61+ batch_processing (page , "S9" , "Invitation & Test Kit (FIT)" , "S10 - Invitation & Test Kit Sent" , True )
5562
5663 # Print a set of reminder letters
5764 logging .info ("Compartment 1 - Process S10 Batch" )
58- batch_processing (page , "S10" , "Test Kit Reminder" , "S19 - Reminder of Initial Test Sent" )
65+ batch_processing (page , "S10" , "Test Kit Reminder" , "S19 - Reminder of Initial Test Sent" , False )
5966
6067 # Log out
6168 Logout (page ).log_out ()
0 commit comments