forked from nhs-england-tools/playwright-python-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/bcss 20440 playwright utils markdown screening subject page searcher #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
victor-soares-ibm
merged 10 commits into
main
from
feature/BCSS-20440-playwright-utils-markdown-screening-subject-page-searcher
May 14, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cf50ff1
Added utility guide for screening subject search
victor-soares-ibm 3878f0d
Removed trailing spaces and spelling errors
victor-soares-ibm d7fbd88
Tried removing trailing whitespaces
victor-soares-ibm 2ff2967
Feature/bcss 20443 compartment 6 pom record diagnosis date (#63)
adrianoaru-nhs d8cb593
Responded to review comments and updated doc strings
victor-soares-ibm 42bb133
Feature/bcss 20476 c6 pom advance fobt screening episode (#59)
mepr1 4bb1577
Removed trailing spaces
victor-soares-ibm abaa703
Attempt to fix markdown errors
victor-soares-ibm e97f630
Attempt to fix markdown errors 2
victor-soares-ibm 6a87a46
Merge branch 'main' into feature/BCSS-20440-playwright-utils-markdown…
victor-soares-ibm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,256 @@ | ||
| # Utility Guide: Screening Subject Page Searcher | ||
|
|
||
| The Screening Subject Search utility allows for | ||
|
|
||
| - searching for relevant subjects using their NHS Number, forename, last name, DOB, postcode, episode closed date, status or latest event status | ||
| - verifying the subject's event status using their NHS number | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [Utility Guide: Screening Subject Page Searcher](#utility-guide-screening-subject-page-searcher) | ||
| - [Table of Contents](#table-of-contents) | ||
| - [Functions Overview](#functions-overview) | ||
| - [The page object parameter](#the-page-object-parameter) | ||
| - [Verify subject event status by NHS no](#verify-subject-event-status-by-nhs-no) | ||
| - [Arguments](#arguments) | ||
| - [How This Function Works](#how-this-function-works) | ||
| - [Search subject by NHS number](#search-subject-by-nhs-number) | ||
| - [Arguments](#arguments-1) | ||
| - [How This Function Works](#how-this-function-works-1) | ||
| - [Search subject by surname](#search-subject-by-surname) | ||
| - [Arguments](#arguments-2) | ||
| - [How This Function Works](#how-this-function-works-2) | ||
| - [Search subject by forename](#search-subject-by-forename) | ||
| - [Arguments](#arguments-3) | ||
| - [How This Function Works](#how-this-function-works-3) | ||
| - [Search subject by date of birth](#search-subject-by-date-of-birth) | ||
| - [Arguments](#arguments-4) | ||
| - [How This Function Works](#how-this-function-works-4) | ||
| - [Search subject by postcode](#search-subject-by-postcode) | ||
| - [Arguments](#arguments-5) | ||
| - [How This Function Works](#how-this-function-works-5) | ||
| - [Search subject by episode closed date](#search-subject-by-episode-closed-date) | ||
| - [Arguments](#arguments-6) | ||
| - [How This Function Works](#how-this-function-works-6) | ||
| - [Search subject by status](#search-subject-by-status) | ||
| - [Arguments](#arguments-7) | ||
| - [How This Function Works](#how-this-function-works-7) | ||
| - [Search subject by latest event status](#search-subject-by-latest-event-status) | ||
| - [Arguments](#arguments-8) | ||
| - [How This Function Works](#how-this-function-works-8) | ||
| - [Search subject by search area](#search-subject-by-search-area) | ||
| - [Required Arguments](#required-arguments) | ||
| - [Optional Arguments](#optional-arguments) | ||
| - [How This Function Works](#how-this-function-works-9) | ||
| - [Check clear filters button works](#check-clear-filters-button-works) | ||
| - [Arguments](#arguments-9) | ||
| - [How This Function Works](#how-this-function-works-10) | ||
|
|
||
| ## Functions Overview | ||
|
|
||
| For this utility we have the following functions: | ||
|
|
||
| - `verify_subject_event_status_by_nhs_no` | ||
| - `search_subject_by_nhs_number` | ||
| - `search_subject_by_surname` | ||
| - `search_subject_by_forename` | ||
| - `search_subject_by_dob` | ||
| - `search_subject_by_postcode` | ||
| - `search_subject_by_episode_closed_date` | ||
| - `search_subject_by_status` | ||
| - `search_subject_by_latest_event_status` | ||
| - `search_subject_by_search_area` | ||
| - `check_clear_filters_button_works` | ||
|
|
||
| ### The page object parameter | ||
|
|
||
| - Is required for all the listed functions above. | ||
| - It is listed as an argument just once to avoid repetition. | ||
|
|
||
| ### Verify subject event status by NHS no | ||
|
|
||
| This is used to check that the latest event status of a subject has been updated to what is expected. | ||
| The provided NHS no is used to search the whole database and then verifies the latest event status is as expected. | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `page`: | ||
| - Type: `Page` | ||
| - This is the playwright page object which is used to tell playwright what page the test is currently on | ||
| - `nhs_no`: | ||
| - Type: `str` | ||
| - This is the subject's NHS number. For example: 123 456 7890 | ||
| - `latest_event_status`: | ||
| - Type: `str` | ||
| - This is the expected status of the subject that is being verified | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by navigating to the main menu if not already on this page. This is done to ensure that this can be called from any page | ||
| 2. Once on the main menu it navigates to the screening subject search page | ||
| 3. From here it fills in the NHS number filter field with the supplied NHS number and chooses the whole area database as the search area option | ||
| 4. It then clicks the search button | ||
| 5. Once the subject is returned, it then verifies that the latest event status matches the supplied event status | ||
|
|
||
| ### Search subject by NHS number | ||
|
|
||
| This searches for a subject by their NHS Number | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `nhs_no`: | ||
| - Type: `str` | ||
| - This is the subject's NHS number. For example: 123 456 7890 | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the NHS number filter field with the supplied NHS number and clicks the search button | ||
|
|
||
| ### Search subject by surname | ||
|
|
||
| This searches for a subject by their surname | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `surname`: | ||
| - Type: `str` | ||
| - This is the subject's surname | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the surname filter field with the supplied surname and clicks the search button | ||
|
|
||
| ### Search subject by forename | ||
|
|
||
| This searches for a subject by their forename | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `forename`: | ||
| - Type: `str` | ||
| - This is the subject's forename | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the forename filter field with the supplied forename and clicks the search button | ||
|
|
||
| ### Search subject by date of birth | ||
|
|
||
| This searches for a subject by their date of birth | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `dob`: | ||
| - Type: `str` | ||
| - This is the subject's date of birth | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the date of birth filter field with the supplied DOB and clicks the search button | ||
|
|
||
| ### Search subject by postcode | ||
|
|
||
| This searches for a subject by their postcode | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `postcode`: | ||
| - Type: `str` | ||
| - This is the subject's postcode | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the postcode filter field with the supplied postcode and clicks the search button | ||
|
|
||
| ### Search subject by episode closed date | ||
|
|
||
| This searches for a subject by their episode closed date | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `episode_closed_date`: | ||
| - Type: `str` | ||
| - This is the subject's episode closed date | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then fills in the episode closed date filter field with the supplied date and clicks the search button | ||
|
|
||
| ### Search subject by status | ||
|
|
||
| This searches for a subject by their screening status | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `status`: | ||
| - Type: `str` | ||
| - This is the subject's screening status | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then selects the screening status option that matches the supplied status and clicks the search button | ||
|
|
||
| ### Search subject by latest event status | ||
|
|
||
| This searches for a subject by their latest event status | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `status`: | ||
| - Type: `str` | ||
| - This is the subject's latest event status | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then selects the episode status option that matches the supplied status and clicks the search button | ||
|
|
||
| ### Search subject by search area | ||
|
|
||
| This searches for a subject by search area | ||
|
|
||
| #### Required Arguments | ||
|
|
||
| - `status`: | ||
| - Type: `str` | ||
| - This is the subject's screening status | ||
| - `search_area`: | ||
| - Type: `str` | ||
| - This is the search area option to use | ||
|
|
||
| #### Optional Arguments | ||
|
|
||
| - `code`: | ||
| - Type: `str` | ||
| - `gp_practice_code`: | ||
| - Type: `str` | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It starts off by clicking on the **Clear filters** button to remove any persisting filters | ||
| 2. It then selects the screening status option that matches the supplied status | ||
| 3. If provided, the code parameter is used to fill the appropriate code filter field | ||
| 4. If provided, the GP practice code parameter is used to fill the GP Practice in CCG filter field | ||
| 5. It then clicks the search button | ||
|
|
||
| ### Check clear filters button works | ||
|
|
||
| This checks that the "clear filter" button works as intended | ||
|
|
||
| #### Arguments | ||
|
|
||
| - `nhs_no`: | ||
| - Type: `str` | ||
| - This is the subject's NHS number. For example: 123 456 7890 | ||
|
|
||
| #### How This Function Works | ||
|
|
||
| 1. It fills in the NHS number filter field with the supplied NHS number and verifies that the NHS number filter field contains the entered value | ||
| 2. It then clicks the clear filters button and verifies that the NHS number filter field is now empty | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.