Skip to content

Commit 88c33d9

Browse files
committed
Merge branch 'main' into feature/smokescreen_compartment_1
# Conflicts: # pages/bcss_home_page.py # pages/cognito_login_page.py # pages/reports_page.py # pages/screening_subject_search_page.py # pytest.ini # requirements.txt # tests/test_bowel_scope_page.py # tests/test_call_and_recall_page.py # tests/test_communications_production_page.py # tests/test_contacts_list_page.py # tests/test_download_page.py # tests/test_fit_test_kits_page.py # tests/test_gfobt_test_kits_page.py # tests/test_home_page_links.py # tests/test_login_to_bcss.py # tests/test_lynch_surveillance_page.py # tests/test_organisations_page.py # tests/test_reports_page.py # tests/test_screening_practitioner_appointments_page.py # tests/test_screening_subject_search_page.py
2 parents bc3a8dc + 9cdc583 commit 88c33d9

File tree

8 files changed

+19
-16
lines changed

8 files changed

+19
-16
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# DO NOT COMMIT THIS FILE
2+
3+
BCSS_PASS=

.github/workflows/stage-3-build.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030

3131
jobs:
3232
run-tests:
33-
name: "Run Util & Example Tests"
33+
name: "Run Util Tests"
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 3
3636
steps:
@@ -43,12 +43,8 @@ jobs:
4343
run: |
4444
python -m pip install --upgrade pip
4545
pip install -r requirements.txt
46-
- name: Ensure browsers are installed
47-
run: python -m playwright install --with-deps
4846
- name: Run util tests
4947
run: pytest -m "utils" --ignore=tests/
50-
- name: Run example tests
51-
run: pytest
5248
- uses: actions/upload-artifact@v4
5349
if: ${{ !cancelled() }}
5450
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ __pycache__/
1616
.pytest_cache/
1717
test-results/
1818
axe-reports/
19+
.env

LICENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT Licence
22

3-
Copyright (c) 2024 Crown Copyright NHS England.
3+
Copyright (c) 2025 Crown Copyright NHS England.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
[![CI/CD Pull Request](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/nhs-england-tools/playwright-python-blueprint/actions/workflows/cicd-1-pull-request.yaml)
44

5-
This project is designed to provide a blueprint to allow for development teams to start quickly developing UI tests using [Playwright Python](https://playwright.dev/python/), providing the base framework and utilities to allow for initial focus on writing tests, rather than configuration of the framework itself.
5+
This project is designed to provide a blueprint to allow for development teams to start quickly developing UI tests using [Playwright Python](https://playwright.dev/python/), providing the base framework and utilities to allow for initial focus on writing tests, rather than configuration of the framework itself. Playwright is the current mainstream UI testing tool for NHS England, as outlined on the [NHS England Tech Radar](https://radar.engineering.england.nhs.uk/).
66

7-
NOTE: This project is currently under initial development so isn't finalised, but should work if you want to experiment with Playwright Python.
8-
9-
> **NOTE: When considering this project, please be advised that currently Playwright is a "proposed" tool within the [NHS England Tech Radar](https://radar.engineering.england.nhs.uk/). Whilst we are taking steps to get Playwright moved to the "mainstream" section of the radar, as it has not yet been formally adopted it is possible that Playwright may not be fully endorsed by NHS England as a standard tool going forward, and using this framework for an NHS England project is currently at your own risk.**
7+
> NOTE: This project is currently under initial development so isn't finalised, but should work if you want to experiment with Playwright Python.
108
119
## Table of Contents
1210

buildBase.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim
1+
FROM python:3.13-slim
22

33
WORKDIR /test
44

scripts/docker/examples/python/assets/hello_world/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ click==8.1.7
33
Flask-WTF==1.2.0
44
Flask==2.3.3
55
itsdangerous==2.1.2
6-
Jinja2==3.1.4
6+
Jinja2==3.1.6
77
MarkupSafe==2.1.3
88
pip==23.3
99
setuptools==70.0.0

utils/axe.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,15 @@ def details_section(header: str) -> str:
165165
section += f'''<table class="details-section"><tr><th>ID</th><td>{check["id"]}</td></tr>
166166
<tr><th class "details-header">Impact</th><td>{check["impact"]}</td></tr>
167167
<tr><th class "details-header">Tags</th><td>{check["tags"]}</td></tr>
168-
<tr><th class "details-header">Description</th><td>{str(check["description"]).replace("<", "").replace(">", "")}</td></tr>
169-
<tr><th class "details-header">Help</th><td>{str(check["help"]).replace("<", "").replace(">", "")}</td></tr>
170-
<tr><th class "details-header">Help URL</th><td><a href="{check["helpUrl"]}" target="_blank">{check["helpUrl"]}</a></td></tr>
171-
</table><br />'''
168+
<tr><th class "details-header">Description</th><td>{str(check["description"]).replace("<", "&lt;").replace(">", "&rt;")}</td></tr>
169+
<tr><th class "details-header">Help</th><td>{str(check["help"]).replace("<", "&lt;").replace(">", "&rt;")}</td></tr>
170+
<tr><th class "details-header">Help URL</th><td><a href="{check["helpUrl"]}" target="_blank">{check["helpUrl"]}</a></td></tr>'''
171+
172+
if 'nodes' in check:
173+
for node in check['nodes']:
174+
section += f'''<tr><th class "details-header">Affected Node</th><td><code>{str(node).replace("<", "&lt;").replace(">", "&rt;")}</code></td></tr>'''
175+
176+
section += '</table><br />'
172177
else:
173178
section += f'<p>No {header} results returned.</p>'
174179

0 commit comments

Comments
 (0)