Skip to content

Commit 15c3df2

Browse files
committed
working on duplicates
1 parent 5f627a2 commit 15c3df2

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

tests/regression/regression_tests/fobt_regression_tests/test_scenario_17.py

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
@pytest.mark.fobt_regression_tests
8888
def test_scenario_17(page: Page) -> None:
8989
"""
90-
Scenario: 14: Unsuitable for symptomatic (cease)
90+
Scenario: 17: Unsuitable for symptomatic (cease)
9191
9292
S9-S10-S43-A8-A183-A25-J10-(A50)-A99-A59-A259-A315-A360-A410-A415-A416-A316-A348-A372-A357-(A167)-A356-C203 [SSCL24b]
9393
@@ -174,10 +174,8 @@ def test_scenario_17(page: Page) -> None:
174174
)
175175

176176
# Then my subject has been updated as follows:
177-
subject_assertion(
178-
nhs_no,
179-
{"latest event status": "S43 Kit Returned and Logged (Initial Test)"},
180-
)
177+
criteria = {"latest event status": "S43 Kit Returned and Logged (Initial Test)"}
178+
subject_assertion(nhs_no, criteria)
181179

182180
# When I read my subject's latest logged FIT kit as "ABNORMAL"
183181
FitKitLogged().read_latest_logged_kit(
@@ -198,11 +196,14 @@ def test_scenario_17(page: Page) -> None:
198196
# And I select "BCS001" as the screening centre where the practitioner appointment will be held
199197
# And I set the practitioner appointment date to "today"
200198
# And I book the "earliest" available practitioner appointment on this date
199+
screening_centre = "BCS001 - Wolverhampton Bowel Cancer Screening Centre"
200+
site = "The Royal Hospital (Wolverhampton)"
201+
201202
book_appointments(
202-
page,
203-
screening_centre="BCS001 - Wolverhampton Bowel Cancer Screening Centre",
204-
site="The Royal Hospital (Wolverhampton)",
205-
)
203+
page,
204+
screening_centre=screening_centre,
205+
site=site,
206+
)
206207

207208
# Then my subject has been updated as follows:
208209
subject_assertion(
@@ -213,9 +214,13 @@ def test_scenario_17(page: Page) -> None:
213214
)
214215

215216
# And there is a "A183" letter batch for my subject with the exact title "Practitioner Clinic 1st Appointment"
217+
letter_code = "A183"
218+
letter_type = "Practitioner Clinic 1st Appointment"
219+
is_active = True
220+
216221
SubjectRepository().there_is_letter_batch_for_subject(
217-
nhs_no, "A183", "Practitioner Clinic 1st Appointment", True
218-
)
222+
nhs_no, letter_code, letter_type, is_active
223+
)
219224
# And there is a "A183" letter batch for my subject with the exact title "GP Result (Abnormal)"
220225
SubjectRepository().there_is_letter_batch_for_subject(
221226
nhs_no, "A183", "GP Result (Abnormal)", True
@@ -332,12 +337,11 @@ def test_scenario_17(page: Page) -> None:
332337
AttendDiagnosticTestPage(page).click_save_button()
333338

334339
# Then my subject has been updated as follows:
340+
criteria = {"latest event status": "A259 Attended Diagnostic Test"}
335341
subject_assertion(
336-
nhs_number=nhs_no,
337-
criteria={
338-
"latest event status": "A259 Attended Diagnostic Test",
339-
},
340-
)
342+
nhs_number=nhs_no,
343+
criteria=criteria,
344+
)
341345

342346
# When I view the subject
343347
screening_subject_page_searcher.navigate_to_subject_summary_page(page, nhs_no)
@@ -368,12 +372,6 @@ def test_scenario_17(page: Page) -> None:
368372
f"{df["person_family_name"].iloc[0]} {df["person_given_name"].iloc[0]}"
369373
)
370374
# And I set the following fields and values within the Investigation Dataset for this subject:
371-
general_information = {
372-
"site": 1,
373-
"practitioner": 1,
374-
"testing clinician": person_name,
375-
"aspirant endoscopist": None,
376-
}
377375
endoscopy_information = {
378376
"endoscope inserted": "yes",
379377
"procedure type": "therapeutic",
@@ -391,6 +389,13 @@ def test_scenario_17(page: Page) -> None:
391389
"outcome at time of procedure": OutcomeAtTimeOfProcedureOptions.LEAVE_DEPARTMENT,
392390
"late outcome": LateOutcomeOptions.NO_COMPLICATIONS,
393391
}
392+
general_information = {
393+
"site": 1,
394+
"practitioner": 1,
395+
"testing clinician": person_name,
396+
"aspirant endoscopist": None,
397+
}
398+
394399
# And I set the following completion proof values within the Investigation Dataset for this subject:
395400
completion_information = {"completion proof": CompletionProofOptions.VIDEO_APPENDIX}
396401

@@ -425,8 +430,8 @@ def test_scenario_17(page: Page) -> None:
425430
[
426431
{
427432
"modality": PolypInterventionModalityOptions.POLYPECTOMY,
428-
"device": PolypInterventionDeviceOptions.HOT_SNARE,
429433
"excised": YesNoOptions.YES,
434+
"device": PolypInterventionDeviceOptions.HOT_SNARE,
430435
"retrieved": PolypInterventionRetrievedOptions.YES,
431436
}
432437
],
@@ -442,8 +447,8 @@ def test_scenario_17(page: Page) -> None:
442447
[
443448
{
444449
"modality": PolypInterventionModalityOptions.POLYPECTOMY,
445-
"device": PolypInterventionDeviceOptions.HOT_SNARE,
446450
"excised": YesNoOptions.YES,
451+
"device": PolypInterventionDeviceOptions.HOT_SNARE,
447452
"retrieved": PolypInterventionRetrievedOptions.YES,
448453
"excision technique": PolypInterventionExcisionTechniqueOptions.PIECE_MEAL,
449454
"polyp appears fully resected endoscopically": YesNoOptions.YES,

0 commit comments

Comments
 (0)