Skip to content

Commit 8a6d66e

Browse files
committed
Adressed PR comments
1 parent 7200a4e commit 8a6d66e

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Note: This project is actively maintained and evolving.
2323
- [2. Set up a virtual environment (recommended)](#2-set-up-a-virtual-environment-recommended)
2424
- [First Create the virtual environment](#first-create-the-virtual-environment)
2525
- [Next Activate the virtual environment](#next-activate-the-virtual-environment)
26-
- [3. Install Playwright browser binaries](#3-install-playwright-browser-binaries)
2726
- [Installation \& Configuration](#installation--configuration)
2827
- [1. Install Dependencies](#1-install-dependencies)
2928
- [2. Environment Variables](#2-environment-variables)
@@ -48,6 +47,7 @@ Note: This project is actively maintained and evolving.
4847
- [2. Example: Wait Utility](#2-example-wait-utility)
4948
- [3. Best Practices](#3-best-practices)
5049
- [4. Blueprint Utilities](#4-blueprint-utilities)
50+
- [5. BCSS Project Specific Utilities](#5-bcss-project-specific-utilities)
5151
- [Contributing](#contributing)
5252
- [Contacts](#contacts)
5353
- [Licence](#licence)
@@ -90,26 +90,18 @@ This step tells your terminal to use the Python version and packages inside .ven
9090

9191
On Windows (Command Prompt):
9292

93-
`.venv\Scripts\activate`
93+
`.venv/Scripts/activate`
9494

9595
On Windows (PowerShell):
9696

97-
`.venv\Scripts\Activate.ps1`
97+
`.venv/Scripts/Activate.ps1`
9898

9999
On macOS/Linux:
100100

101101
`source .venv/bin/activate`
102102

103103
Once activated, your terminal will show the virtual environment name (e.g. (.venv)), indicating you're working inside it.
104104

105-
#### 3. Install Playwright browser binaries
106-
107-
Playwright uses real browsers to run tests. You’ll need to install these browser binaries once by running:
108-
109-
`playwright install`
110-
111-
This downloads the necessary versions of Chromium, Firefox, and WebKit so tests can run across different browser types.
112-
113105
### Installation & Configuration
114106

115107
#### 1. Install Dependencies
@@ -127,7 +119,7 @@ Note: If you're using a virtual environment (recommended), activate it before ru
127119

128120
#### 2. Environment Variables
129121

130-
Create a `.env` file in the project root to store sensitive configuration values like credentials, URLs, or feature flags. Example:
122+
Create a `local.env` file in the project root, by running `setup_env_file.py`, to store sensitive configuration values like credentials, URLs, or feature flags. Example:
131123

132124
```Bash
133125
BASE_URL=https://bcss.example.com
@@ -136,8 +128,8 @@ PASSWORD=secure_password123
136128
```
137129

138130
These variables are loaded automatically by the framework using `python-dotenv`, keeping secrets out of the codebase.
139-
The actual values required for the `.env` file can be obtained from one of the testers already using this framework.
140-
Important Note: Ensure that `.env` is added to your `.gitignore` to avoid accidentally committing secrets.
131+
The actual values required for the `local.env` file can be obtained from one of the testers already using this framework.
132+
Important Note: Ensure that `local.env` is added to your `.gitignore` to avoid accidentally committing secrets.
141133

142134
#### 3. Test Configuration
143135

@@ -210,10 +202,10 @@ Each test typically follows this structure:
210202

211203
```Python
212204
def test_user_can_login(page):
213-
login_page = LoginPage(page)
214-
login_page.navigate()
215-
login_page.login("[email protected]", "securepassword")
216-
assert login_page.is_logged_in()
205+
UserTools.user_login(page, "Hub Manager State Registered at BCS01") # Users are defined in users.json
206+
expect(page.locator("#ntshAppTitle")).to_contain_text(
207+
"Bowel Cancer Screening System"
208+
)
217209
```
218210

219211
- Use Page Object Model (POM) for UI interactions
@@ -334,7 +326,7 @@ def wait_for_element(page, selector, timeout=5000):
334326

335327
#### 4. Blueprint Utilities
336328

337-
This blueprint provides the following utility classes, that can be used to aid in testing:
329+
This project was built on the existing NHS England Playwright Python Blueprint. The blueprint provides the following utility classes, that can be used to aid in testing:
338330

339331
| Utility | Description |
340332
| ------------------------------------------------------------- | -------------------------------------------- |
@@ -343,6 +335,32 @@ This blueprint provides the following utility classes, that can be used to aid i
343335
| [NHSNumberTools](./docs/utility-guides/NHSNumberTools.md) | Basic tools for working with NHS numbers. |
344336
| [User Tools](./docs/utility-guides/UserTools.md) | Basic user management tool. |
345337

338+
#### 5. BCSS Project Specific Utilities
339+
340+
These utilities have been created specifically for the bcss playwright project:
341+
342+
| Utility | Description |
343+
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
344+
| [Appointments Utility](.docs/utility-guides/Appointments.md) | Automates appointment slot setup for multiple practitioners at a screening centre, including calendar navigation and slot configuration. |
345+
| [Batch Processing Utility](.docs/utility-guides/BatchProcessing.md) | Provides a one-stop function to process batches end-to-end, including preparation, printing, subject verification, and archive confirmation. |
346+
| [Calendar Picker](.docs/utility-guides/CalendarPicker.md) | Provides methods to interact with BCSS’s three distinct calendar types |
347+
| [Dataset Field Utility](.docs/utility-guides/DatasetField.md) | Dynamically locates and populates input/select fields based on label text, supporting both flat and nested dataset structures. |
348+
| [Fit Kit Utility](.docs/utility-guides/FitKit.md) | Provides methods to generate FIT device IDs, split test kits into normal/abnormal groups, and simulate compartment 3 workflows. |
349+
| [Investigation Dataset Utility](.docs/utility-guides/InvestigationDataset.md) | Automates the completion and progression of investigation datasets based on subject age and result type, with support for custom field values. |
350+
| [Last Test Run](.docs/utility-guides/LastTestRun.md) | Tracks when specific tests were last executed to avoid redundant setups and enable “run once per day” logic. |
351+
| [Load Properties](.docs/utility-guides/LoadProperties.md) | Loads key-value pairs from `.properties` files to centralize configuration and avoid hard-coded values in tests. |
352+
| [Manual Cease Workflow](.docs/utility-guides/ManualCease.md) | Automates subject creation, UI interaction, and DB verification for manual cease flows, including disclaimer handling. |
353+
| [NHS Number Tools](.docs/utility-guides/NHSNumberTools.md) | Validates NHS numbers and formats them for display or input, ensuring compliance with NHS standards. |
354+
| [Notify Criteria Parser](.docs/utility-guides/NotifyCriteriaParser.md) | Parses compact Notify filter strings (e.g. "S1 (S1w) - sending") into structured components for use in selection builders and SQL queries. |
355+
| [Oracle Utility](.docs/utility-guides/Oracle.md) | Provides direct access to Oracle DB for querying, executing stored procedures, and generating synthetic test subjects. |
356+
| [PDF Reader](.docs/utility-guides/PDFReader.md) | Extracts NHS numbers from PDF documents by scanning for "NHS No:" markers, returning results as a pandas DataFrame. |
357+
| [Screening Subject Page Searcher](.docs/utility-guides/ScreeningSubjectPageSearcher.md) | Provides methods to search for subjects by NHS number, name, DOB, postcode, and status, and verify event status directly from the UI. |
358+
| [Subject Demographics](.docs/utility-guides/SubjectDemographics.md) | Updates subject demographic data such as DOB and postcode, with support for randomized age ranges and direct field manipulation. |
359+
| [Subject Notes](.docs/utility-guides/SubjectNotes.md) | Verifies note content against database and UI, and confirms proper archiving of removed notes as obsolete. |
360+
| [Subject Selection Query Builder](.docs/utility-guides/SubjectSelectionQueryBuilder.md) | Dynamically builds SQL queries to retrieve subjects based on screening status, demographics, Notify messages, and more. |
361+
| [Table Utility](.docs/utility-guides/TableUtil.md) | Provides helper methods for interacting with HTML tables, including row selection, column indexing, and data extraction. |
362+
| [User Tools](.docs/utility-guides/UserTools.md) | Manages test user credentials via `users.json`, supports login automation, and retrieves user metadata for role-based testing. |
363+
346364
### Contributing
347365

348366
Further guidance on contributing to this project can be found in our [contribution](./CONTRIBUTING.md) page.

0 commit comments

Comments
 (0)