1414 SubjectScreeningSummaryPage ,
1515)
1616from pages .communication_production .batch_list_page import BatchListPage
17+ from pages .logout .log_out_page import LogoutPage
1718
1819
20+ @pytest .mark .vpn_required
21+ @pytest .mark .regression
1922@pytest .mark .fobt_regression_tests
2023def test_scenario_2 (page : Page ) -> None :
2124 """
@@ -69,7 +72,6 @@ def test_scenario_2(page: Page) -> None:
6972 "screening status" : "Inactive" ,
7073 },
7174 )
72- logging .info ("[DB ASSERTIONS COMPLETE] Created subject details checked in the DB" )
7375
7476 # Navigate to subject summary page in UI
7577 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
@@ -81,24 +83,20 @@ def test_scenario_2(page: Page) -> None:
8183
8284 # When I run the FOBT failsafe trawl for my subject
8385 CallAndRecallUtils ().run_failsafe (nhs_no )
84- logging .info (f"[FAILSAFE TRAWL RUN] FOBT failsafe trawl run for subject { nhs_no } " )
8586
8687 # Then my subject has been updated as follows:
87- today = datetime .now ().strftime ("%d/%m/%Y" )
88-
8988 subject_assertion (
9089 nhs_no ,
9190 {
9291 "subject has episodes" : "No" ,
9392 "Screening Due Date" : "Last Birthday" ,
94- "Screening due date date of change" : today ,
93+ "Screening due date date of change" : "Today" ,
9594 "Screening Due Date Reason" : "Failsafe Trawl" ,
9695 "screening status" : "Call" ,
97- "Screening Status Date of Change" : today ,
96+ "Screening Status Date of Change" : "Today" ,
9897 "Screening Status Reason" : "Failsafe Trawl" ,
9998 },
10099 )
101- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject details checked in the DB" )
102100
103101 # Navigate to subject summary page in UI
104102 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
@@ -119,20 +117,13 @@ def test_scenario_2(page: Page) -> None:
119117 "latest episode type" : "FOBT" ,
120118 },
121119 )
122- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject details checked in the DB" )
123120
124121 # Then there is a "S1" letter batch for my subject with the exact title "Pre-invitation (FIT)"
125- BatchListPage (page ).navigate_to_active_batch_list_page ()
126- ActiveBatchListPage (page ).is_batch_present ("S1 - Pre-invitation (FIT)" )
127- logging .info ("[UI ASSERTIONS COMPLETE] S1 Letter batch exists" )
128-
129122 # When I process the open "S1" letter batch for my subject
130123 # Then there is a "S9" letter batch for my subject with the exact title "Invitation & Test Kit (FIT)"
131124 batch_processing (
132125 page , "S1" , "Pre-invitation (FIT)" , "S9 - Pre-invitation Sent" , True
133126 )
134- logging .info ("[UI ASSERTIONS COMPLETE] Updated subject details checked in the UI" )
135- logging .info ("[UI ASSERTIONS COMPLETE] S9 Letter batch exists" )
136127
137128 # Then my subject has been updated as follows:
138129 subject_assertion (
@@ -141,7 +132,6 @@ def test_scenario_2(page: Page) -> None:
141132 "latest event status" : "S9 - Pre-invitation Sent" ,
142133 },
143134 )
144- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject status checked in the DB" )
145135
146136 # When I process the open "S9" letter batch for my subject
147137 batch_processing (
@@ -151,7 +141,6 @@ def test_scenario_2(page: Page) -> None:
151141 "S10 - Invitation & Test Kit Sent" ,
152142 True ,
153143 )
154- logging .info ("[UI ASSERTIONS COMPLETE] Updated subject status checked in the UI" )
155144
156145 # Then my subject has been updated as follows:
157146 subject_assertion (
@@ -160,7 +149,6 @@ def test_scenario_2(page: Page) -> None:
160149 "latest event status" : "S10 - Invitation & Test Kit Sent" ,
161150 },
162151 )
163- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject status checked in the DB" )
164152
165153 # When I log my subject's latest unlogged FIT kit
166154 fit_kit = FitKitGeneration ().get_fit_kit_for_subject_sql (nhs_no , False , False )
@@ -174,7 +162,6 @@ def test_scenario_2(page: Page) -> None:
174162 "latest event status" : "S43 Kit Returned and Logged (Initial Test)" ,
175163 },
176164 )
177- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject status checked in the DB" )
178165
179166 # Navigate to subject summary page in UI
180167 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
@@ -195,7 +182,6 @@ def test_scenario_2(page: Page) -> None:
195182 "latest event status" : "S2 Normal" ,
196183 },
197184 )
198- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject status checked in the DB" )
199185
200186 # Navigate to subject summary page in UI
201187 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
@@ -217,7 +203,6 @@ def test_scenario_2(page: Page) -> None:
217203 "S158 - Subject Discharge Sent (Normal)" ,
218204 True ,
219205 )
220- logging .info ("[UI ASSERTIONS COMPLETE] Updated subject status checked in the UI" )
221206
222207 # Then my subject has been updated as follows:
223208 subject_assertion (
@@ -226,13 +211,8 @@ def test_scenario_2(page: Page) -> None:
226211 "latest event status" : "S158 Subject Discharge Sent (Normal)" ,
227212 },
228213 )
229- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject status checked in the DB" )
230214
231215 # And there is a "S158" letter batch for my subject with the exact title "GP Result (Normal)"
232- BatchListPage (page ).navigate_to_active_batch_list_page ()
233- ActiveBatchListPage (page ).is_batch_present ("S158 - GP Result (Normal)" )
234- logging .info ("[UI ASSERTIONS COMPLETE] S158 Letter batch exists" )
235-
236216 # When I process the open "S158" letter batch for my subject
237217 batch_processing (
238218 page ,
@@ -241,7 +221,6 @@ def test_scenario_2(page: Page) -> None:
241221 "S159 - GP Discharge Sent (Normal)" ,
242222 True ,
243223 )
244- logging .info ("[UI ASSERTIONS COMPLETE] Updated subject status checked in the UI" )
245224
246225 # Then my subject has been updated as follows:
247226 subject_assertion (
@@ -274,6 +253,6 @@ def test_scenario_2(page: Page) -> None:
274253 "surveillance due date reason" : "Unchanged" ,
275254 },
276255 )
277- logging .info ("[DB ASSERTIONS COMPLETE] Updated subject details checked in the DB" )
278256
279257 logging .info ("[TEST COMPLETE] Scenario 2 passed all assertions" )
258+ LogoutPage (page ).log_out ()
0 commit comments