Skip to content

Commit 95a942d

Browse files
BCSS-20562 - BCSS - Playwright - Review pytest markers (#77)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description This '@pytest.mark.smoke' added for all missing functions in 'test_' files under 'tests' folder as these are critical functions which will be considered during the smoke Test run. This '@pytest.mark.smokescreen' added for all missing functions in 'test_compartment_' files under 'tests --> Smokescreen' folder as these are critical functions which will be considered during the smokescreen Test run of compartments 1 to 6. This '@pytest.mark.vpn_required' is added only for missing functions which uses Database. <!-- Describe your changes in detail. --> ## Context Just it is a code review for pytest markers & No code change is implemeted. <!-- Why is this change required? What problem does it solve? --> ## Type of changes This line of syntax is added as it is required in order to identify & invoke all the critical functionalities when we are doing Smoke Test run of Compartments (1 to 6). <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [X] Refactoring (non-breaking change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [X] I am familiar with the [contributing guidelines](https://github.com/nhs-england-tools/playwright-python-blueprint/blob/main/CONTRIBUTING.md) - [X] I have followed the code style of the project - [ ] I have added tests to cover my changes (where appropriate) - [ ] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [X] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent c65617f commit 95a942d

File tree

7 files changed

+42
-3
lines changed

7 files changed

+42
-3
lines changed

tests/smokescreen/test_compartment_1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from utils.batch_processing import batch_processing
1313

1414

15-
@pytest.mark.smoke
15+
@pytest.mark.smokescreen
1616
@pytest.mark.compartment1
1717
@pytest.mark.compartment1_plan_creation
1818
def test_create_invitations_plan(page: Page, smokescreen_properties: dict) -> None:
@@ -43,7 +43,6 @@ def test_create_invitations_plan(page: Page, smokescreen_properties: dict) -> No
4343

4444

4545
@pytest.mark.vpn_required
46-
@pytest.mark.smoke
4746
@pytest.mark.smokescreen
4847
@pytest.mark.compartment1
4948
def test_compartment_1(page: Page, smokescreen_properties: dict) -> None:

tests/smokescreen/test_compartment_2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
@pytest.mark.vpn_required
16-
@pytest.mark.smoke
1716
@pytest.mark.smokescreen
1817
@pytest.mark.compartment2
1918
def test_compartment_2(page: Page, smokescreen_properties: dict) -> None:

tests/test_call_and_recall_page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def test_call_and_recall_page_navigation(page: Page) -> None:
6060
BasePage(page).main_menu_header_is_displayed()
6161

6262

63+
@pytest.mark.smoke
6364
def test_view_an_invitation_plan(page: Page, general_properties: dict) -> None:
6465
"""
6566
Confirms that an invitation plan can be viewed via a screening centre from the planning ad monitoring page

tests/test_gfobt_test_kits_page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def test_gfobt_test_kit_page_navigation(page: Page) -> None:
5959
BasePage(page).main_menu_header_is_displayed()
6060

6161

62+
@pytest.mark.smoke
6263
def test_create_a_qc_kit(page: Page) -> None:
6364
"""
6465
Confirms that a qc test kit can be created and that each of the dropdowns has an option set available for selection

tests/test_organisations_page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_organisations_page_navigation(page: Page) -> None:
6262
BasePage(page).bowel_cancer_screening_page_title_contains_text("Main Menu")
6363

6464

65+
@pytest.mark.smoke
6566
def test_view_an_organisations_system_parameters(
6667
page: Page, general_properties: dict
6768
) -> None:

tests/test_reports_page.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def before_each(page: Page):
1919
BasePage(page).go_to_reports_page()
2020

2121

22+
@pytest.mark.smoke
2223
def test_reports_page_navigation(page: Page) -> None:
2324
"""
2425
Confirms all menu items are displayed on the reports page, and that the relevant pages
@@ -65,6 +66,7 @@ def test_reports_page_navigation(page: Page) -> None:
6566
BasePage(page).bowel_cancer_screening_page_title_contains_text("Main Menu")
6667

6768

69+
@pytest.mark.smoke
6870
# Failsafe Reports
6971
def test_failsafe_reports_date_report_last_requested(page: Page) -> None:
7072
"""
@@ -101,6 +103,7 @@ def test_failsafe_reports_date_report_last_requested(page: Page) -> None:
101103
)
102104

103105

106+
@pytest.mark.smoke
104107
def test_failsafe_reports_screening_subjects_with_inactive_open_episode(
105108
page: Page,
106109
) -> None:
@@ -134,6 +137,7 @@ def test_failsafe_reports_screening_subjects_with_inactive_open_episode(
134137
)
135138

136139

140+
@pytest.mark.smoke
137141
def test_failsafe_reports_subjects_ceased_due_to_date_of_birth_changes(
138142
page: Page,
139143
) -> None:
@@ -174,6 +178,7 @@ def test_failsafe_reports_subjects_ceased_due_to_date_of_birth_changes(
174178
)
175179

176180

181+
@pytest.mark.smoke
177182
def test_failsafe_reports_allocate_sc_for_patient_movements_within_hub_boundaries(
178183
page: Page, general_properties: dict
179184
) -> None:
@@ -229,6 +234,7 @@ def test_failsafe_reports_allocate_sc_for_patient_movements_within_hub_boundarie
229234
)
230235

231236

237+
@pytest.mark.smoke
232238
def test_failsafe_reports_allocate_sc_for_patient_movements_into_your_hub(
233239
page: Page,
234240
) -> None:
@@ -268,6 +274,7 @@ def test_failsafe_reports_allocate_sc_for_patient_movements_into_your_hub(
268274
)
269275

270276

277+
@pytest.mark.smoke
271278
def test_failsafe_reports_identify_and_link_new_gp(page: Page) -> None:
272279
"""
273280
Confirms 'identify_and_link_new_gp' page loads,
@@ -315,6 +322,7 @@ def test_failsafe_reports_identify_and_link_new_gp(page: Page) -> None:
315322
)
316323

317324

325+
@pytest.mark.smoke
318326
# Operational Reports
319327

320328

@@ -363,6 +371,7 @@ def test_operational_reports_appointment_attendance_not_updated(
363371
BasePage(page).bowel_cancer_screening_page_title_contains_text("Appointment Detail")
364372

365373

374+
@pytest.mark.smoke
366375
def test_operational_reports_fobt_kits_logged_but_not_read(page: Page) -> None:
367376
"""
368377
Confirms 'fobt_kits_logged_but_not_read' page loads,
@@ -393,6 +402,7 @@ def test_operational_reports_fobt_kits_logged_but_not_read(page: Page) -> None:
393402
).to_contain_text(f"Report generated on {report_timestamp}.")
394403

395404

405+
@pytest.mark.smoke
396406
def test_operational_reports_demographic_update_inconsistent_with_manual_update(
397407
page: Page,
398408
) -> None:
@@ -413,6 +423,7 @@ def test_operational_reports_demographic_update_inconsistent_with_manual_update(
413423
)
414424

415425

426+
@pytest.mark.smoke
416427
def test_operational_reports_screening_practitioner_6_weeks_availability_not_set_up(
417428
page: Page, general_properties: dict
418429
) -> None:
@@ -462,6 +473,7 @@ def test_operational_reports_screening_practitioner_6_weeks_availability_not_set
462473
).to_contain_text(report_timestamp)
463474

464475

476+
@pytest.mark.smoke
465477
def test_operational_reports_screening_practitioner_appointments(
466478
page: Page, general_properties: dict
467479
) -> None:

tests/test_screening_subject_search_page.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def test_search_screening_subject_by_nhs_number(
5555
).verify_subject_search_results_title_subject_screening_summary()
5656

5757

58+
@pytest.mark.smoke
5859
def test_search_screening_subject_by_surname(
5960
page: Page, general_properties: dict
6061
) -> None:
@@ -72,6 +73,7 @@ def test_search_screening_subject_by_surname(
7273
).verify_subject_search_results_title_subject_screening_summary()
7374

7475

76+
@pytest.mark.smoke
7577
def test_search_screening_subject_by_forename(
7678
page: Page, general_properties: dict
7779
) -> None:
@@ -89,6 +91,7 @@ def test_search_screening_subject_by_forename(
8991
).verify_subject_search_results_title_subject_screening_summary()
9092

9193

94+
@pytest.mark.smoke
9295
def test_search_screening_subject_by_dob(page: Page, general_properties: dict) -> None:
9396
"""
9497
Confirms a screening subject can be searched for, using their date of birth by doing the following:
@@ -104,6 +107,7 @@ def test_search_screening_subject_by_dob(page: Page, general_properties: dict) -
104107
).verify_subject_search_results_title_subject_search_results()
105108

106109

110+
@pytest.mark.smoke
107111
def test_search_screening_subject_by_postcode(page: Page) -> None:
108112
"""
109113
Confirms a screening subject can be searched for, using their postcode by doing the following:
@@ -119,6 +123,7 @@ def test_search_screening_subject_by_postcode(page: Page) -> None:
119123
).verify_subject_search_results_title_subject_search_results()
120124

121125

126+
@pytest.mark.smoke
122127
def test_search_screening_subject_by_episode_closed_date(
123128
page: Page, general_properties: dict
124129
) -> None:
@@ -142,6 +147,7 @@ def test_search_screening_subject_by_episode_closed_date(
142147
)
143148

144149

150+
@pytest.mark.smoke
145151
def test_search_criteria_clear_filters_button(
146152
page: Page, general_properties: dict
147153
) -> None:
@@ -153,6 +159,7 @@ def test_search_criteria_clear_filters_button(
153159
check_clear_filters_button_works(page, general_properties["nhs_number"])
154160

155161

162+
@pytest.mark.smoke
156163
# Tests searching via the "Screening Status" drop down list
157164
def test_search_screening_subject_by_status_call(page: Page) -> None:
158165
"""
@@ -169,6 +176,7 @@ def test_search_screening_subject_by_status_call(page: Page) -> None:
169176
).verify_subject_search_results_title_subject_search_results()
170177

171178

179+
@pytest.mark.smoke
172180
def test_search_screening_subject_by_status_inactive(page: Page) -> None:
173181
"""
174182
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -184,6 +192,7 @@ def test_search_screening_subject_by_status_inactive(page: Page) -> None:
184192
).verify_subject_search_results_title_subject_search_results()
185193

186194

195+
@pytest.mark.smoke
187196
def test_search_screening_subject_by_status_opt_in(page: Page) -> None:
188197
"""
189198
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -199,6 +208,7 @@ def test_search_screening_subject_by_status_opt_in(page: Page) -> None:
199208
).verify_subject_search_results_title_subject_search_results()
200209

201210

211+
@pytest.mark.smoke
202212
def test_search_screening_subject_by_status_recall(page: Page) -> None:
203213
"""
204214
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -214,6 +224,7 @@ def test_search_screening_subject_by_status_recall(page: Page) -> None:
214224
).verify_subject_search_results_title_subject_search_results()
215225

216226

227+
@pytest.mark.smoke
217228
def test_search_screening_subject_by_status_self_referral(page: Page) -> None:
218229
"""
219230
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -231,6 +242,7 @@ def test_search_screening_subject_by_status_self_referral(page: Page) -> None:
231242
).verify_subject_search_results_title_subject_search_results()
232243

233244

245+
@pytest.mark.smoke
234246
def test_search_screening_subject_by_status_surveillance(page: Page) -> None:
235247
"""
236248
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -248,6 +260,7 @@ def test_search_screening_subject_by_status_surveillance(page: Page) -> None:
248260
).verify_subject_search_results_title_subject_search_results()
249261

250262

263+
@pytest.mark.smoke
251264
def test_search_screening_subject_by_status_seeking_further_data(page: Page) -> None:
252265
"""
253266
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -265,6 +278,7 @@ def test_search_screening_subject_by_status_seeking_further_data(page: Page) ->
265278
).verify_subject_search_results_title_subject_search_results()
266279

267280

281+
@pytest.mark.smoke
268282
def test_search_screening_subject_by_status_ceased(page: Page) -> None:
269283
"""
270284
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -280,6 +294,7 @@ def test_search_screening_subject_by_status_ceased(page: Page) -> None:
280294
).verify_subject_search_results_title_subject_search_results()
281295

282296

297+
@pytest.mark.smoke
283298
def test_search_screening_subject_by_status_bowel_scope(page: Page) -> None:
284299
"""
285300
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -297,6 +312,7 @@ def test_search_screening_subject_by_status_bowel_scope(page: Page) -> None:
297312
).verify_subject_search_results_title_subject_search_results()
298313

299314

315+
@pytest.mark.smoke
300316
def test_search_screening_subject_by_status_lynch_surveillance(page: Page) -> None:
301317
"""
302318
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -314,6 +330,7 @@ def test_search_screening_subject_by_status_lynch_surveillance(page: Page) -> No
314330
).verify_subject_search_results_title_subject_search_results()
315331

316332

333+
@pytest.mark.smoke
317334
def test_search_screening_subject_by_status_lynch_self_referral(page: Page) -> None:
318335
"""
319336
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -331,6 +348,7 @@ def test_search_screening_subject_by_status_lynch_self_referral(page: Page) -> N
331348
).verify_subject_search_results_title_subject_screening_summary()
332349

333350

351+
@pytest.mark.smoke
334352
# search_subject_by_latest_event_status
335353
def test_search_screening_subject_by_latest_episode_status_open_paused(
336354
page: Page,
@@ -351,6 +369,7 @@ def test_search_screening_subject_by_latest_episode_status_open_paused(
351369
).verify_subject_search_results_title_subject_search_results()
352370

353371

372+
@pytest.mark.smoke
354373
def test_search_screening_subject_by_latest_episode_status_closed(page: Page) -> None:
355374
"""
356375
Confirms screening subjects can be searched for, using the screening status (call) by doing the following:
@@ -368,6 +387,7 @@ def test_search_screening_subject_by_latest_episode_status_closed(page: Page) ->
368387
).verify_subject_search_results_title_subject_search_results()
369388

370389

390+
@pytest.mark.smoke
371391
def test_search_screening_subject_by_latest_episode_status_no_episode(
372392
page: Page,
373393
) -> None:
@@ -387,6 +407,7 @@ def test_search_screening_subject_by_latest_episode_status_no_episode(
387407
).verify_subject_search_results_title_subject_search_results()
388408

389409

410+
@pytest.mark.smoke
390411
# Tests searching via the "Search Area" drop down list
391412
def test_search_screening_subject_by_home_hub(page: Page) -> None:
392413
"""
@@ -407,6 +428,7 @@ def test_search_screening_subject_by_home_hub(page: Page) -> None:
407428
).verify_subject_search_results_title_subject_search_results()
408429

409430

431+
@pytest.mark.smoke
410432
def test_search_screening_subject_by_gp_practice(
411433
page: Page, general_properties: dict
412434
) -> None:
@@ -434,6 +456,7 @@ def test_search_screening_subject_by_gp_practice(
434456
)
435457

436458

459+
@pytest.mark.smoke
437460
def test_search_screening_subject_by_ccg(page: Page, general_properties: dict) -> None:
438461
"""
439462
Confirms screening subjects can be searched for, using the search area (ccg) by doing the following:
@@ -457,6 +480,7 @@ def test_search_screening_subject_by_ccg(page: Page, general_properties: dict) -
457480
).verify_subject_search_results_title_subject_search_results()
458481

459482

483+
@pytest.mark.smoke
460484
def test_search_screening_subject_by_screening_centre(
461485
page: Page, general_properties: dict
462486
) -> None:
@@ -480,6 +504,8 @@ def test_search_screening_subject_by_screening_centre(
480504
).verify_subject_search_results_title_subject_search_results()
481505

482506

507+
@pytest.mark.vpn_required
508+
@pytest.mark.smoke
483509
def test_search_screening_subject_by_whole_database(page: Page) -> None:
484510
"""
485511
Confirms screening subjects can be searched for, using the search area (whole database) by doing the following:

0 commit comments

Comments
 (0)