1616)
1717from pages .communication_production .batch_list_page import BatchListPage
1818from pages .logout .log_out_page import LogoutPage
19+ from pages .screening_subject_search .close_fobt_screening_episode_page import (
20+ CloseFobtScreeningEpisodePage ,
21+ )
1922
2023
2124@pytest .mark .wip
@@ -131,22 +134,14 @@ def test_scenario_4(page: Page) -> None:
131134 )
132135
133136 # Then there is a "S1" letter batch for my subject with the exact title "Pre-invitation (FIT)"
134- batch_processing (
135- page ,
136- "S1" ,
137- "Pre-invitation (FIT)" ,
138- "S9 - Pre-invitation Sent" ,
139- True ,
140- )
141-
142137 # When I process the open "S1" letter batch for my subject
143138 # Then my subject has been updated as follows:
144139 batch_processing (
145140 page ,
146141 "S1" ,
147142 "Pre-invitation (FIT)" ,
148143 "S9 - Pre-invitation Sent" ,
149- False ,
144+ True ,
150145 )
151146
152147 # When I view the subject
@@ -157,22 +152,14 @@ def test_scenario_4(page: Page) -> None:
157152
158153 # When I run Timed Events for my subject
159154 # Then there is a "S9" letter batch for my subject with the exact title "Invitation & Test Kit (FIT)"
160- batch_processing (
161- page ,
162- "S9" ,
163- "Invitation & Test Kit (FIT)" ,
164- "S10 - Invitation & Test Kit Sent" ,
165- True ,
166- )
167-
168155 # When I process the open "S9" letter batch for my subject
169156 # # Then my subject has been updated as follows:
170157 batch_processing (
171158 page ,
172159 "S9" ,
173160 "Invitation & Test Kit (FIT)" ,
174161 "S10 - Invitation & Test Kit Sent" ,
175- False ,
162+ True ,
176163 )
177164
178165 # When I log my subject's latest unlogged FIT kit
@@ -202,42 +189,43 @@ def test_scenario_4(page: Page) -> None:
202189 # When I view the subject
203190 screening_subject_page_searcher .navigate_to_subject_summary_page (page , nhs_no )
204191
192+ # And I close the subject's episode for "Opt out of current episode"
193+ CloseFobtScreeningEpisodePage (page ).close_fobt_screening_episode (
194+ "Opt out of current episode"
195+ )
205196
206- # # And I close the subject's episode for "Opt out of current episode"
207- # CallAndRecallUtils().close_episode(nhs_no, reason="Opt out of current episode")
208-
197+ # Then my subject has been updated as follows:
198+ subject_assertion (
199+ nhs_no ,
200+ {
201+ "calculated FOBT due date" : "2 years from episode end" ,
202+ "calculated lynch due date" : "Null" ,
203+ "calculated surveillance due date" : "Null" ,
204+ "ceased confirmation date" : "Null" ,
205+ "ceased confirmation details" : "Null" ,
206+ "ceased confirmation user ID" : "Null" ,
207+ "clinical reason for cease" : "Null" ,
208+ "latest episode accumulated result" : "Definitive abnormal FOBT outcome" ,
209+ "latest episode recall calculation method" : "S92 Interrupt Close Date" ,
210+ "latest episode recall episode type" : "FOBT Screening" ,
211+ "latest episode recall surveillance type" : "Null" ,
212+ "latest episode status" : "Closed" ,
213+ "latest episode status reason" : "Opt out of current episode" ,
214+ "latest event status" : "S92 Close Screening Episode via Interrupt" ,
215+ "lynch due date" : "Null" ,
216+ "lynch due date date of change" : "Unchanged" ,
217+ "lynch due date reason" : "Unchanged" ,
218+ "screening due date" : "Null" ,
219+ "screening due date date of change" : "Today" ,
220+ "screening due date reason" : "Awaiting failsafe" ,
221+ "screening status" : "Recall" ,
222+ "screening status reason" : "Recall" ,
223+ "surveillance due date" : "Null" ,
224+ "surveillance due date date of change" : "Unchanged" ,
225+ "surveillance due date reason" : "Unchanged" ,
226+ },
227+ )
209228
210- # # Then my subject has been updated as follows:
211- # subject_assertion(
212- # nhs_no,
213- # {
214- # "calculated FOBT due date": "2 years from episode end",
215- # "calculated lynch due date": None,
216- # "calculated surveillance due date": None,
217- # "ceased confirmation date": None,
218- # "ceased confirmation details": None,
219- # "ceased confirmation user ID": None,
220- # "clinical reason for cease": None,
221- # "latest episode accumulated result": "Definitive abnormal FOBT outcome",
222- # "latest episode recall calculation method": "S92 Interrupt Close Date",
223- # "latest episode recall episode type": "FOBT Screening",
224- # "latest episode recall surveillance type": None,
225- # "latest episode status": "Closed",
226- # "latest episode status reason": "Opt out of current episode",
227- # "latest event status": "S92 Close Screening Episode via Interrupt",
228- # "lynch due date": None,
229- # "lynch due date date of change": "Unchanged",
230- # "lynch due date reason": "Unchanged",
231- # "screening due date": None,
232- # "screening due date date of change": "Today",
233- # "screening due date reason": "Awaiting failsafe",
234- # "screening status": "Recall",
235- # "screening status reason": "Recall",
236- # "surveillance due date": None,
237- # "surveillance due date date of change": "Unchanged",
238- # "surveillance due date reason": "Unchanged",
239- # },
240- # )
241229
242230# # When I view the subject
243231# screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
0 commit comments