Skip to content

Commit

Permalink
Fix failing find a patient tests (#26)
Browse files Browse the repository at this point in the history
* Fix failing find a patient tests

* Removed scoop from requirements.txt to fix scan secrets issue

* added requirements.txt to gitleaks ignore list

* Updated path of requirements.txt file

* Added fingerprint to gitleaksignore file

* Added fingerprint to gitleaksignore file

* Added fingerprint to gitleaksignore file

* Added fingerprint to gitleaksignore file

* Fix failing tests main

* Test publish to 2 urls

* Disabled automated tests for wednesday

* Fixed failing age based warning tests and moved to locators instead of selectors for choose vaccine page

* Fixed all failing find a patient tests and changed all elements to be playwright locators instead of selenium selectors

---------

Co-authored-by: root <root@FA-0817>
  • Loading branch information
neelimaguntupalli1-nhs and root authored Oct 8, 2024
1 parent c87ba5c commit 20be971
Show file tree
Hide file tree
Showing 26 changed files with 550 additions and 346 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
destination_branch: gh-pages-dev

- name: Check contents of gh-pages
run: ls -la
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
destination_branch: gh-pages-qa
keep_files: true

- name: Check contents of gh-pages
Expand Down
3 changes: 3 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:generic-api-key:37
1e6cd0c529846102b12aa16a9f85fc94b6cd03c5:helpers/playwrightHelper.py:ipv4:64
bc0e944855d5b2ec35de75c79b6215d56b18ed99:requirements.txt:ipv4:5
648c714b8fd9d6a9bb0102649b1b9a04171dd6b5:requirements.txt:ipv4:5
148da0f8b77440ea672e1fe856056900a9454b2c:requirements.txt:ipv4:5
12 changes: 2 additions & 10 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ def click_back_button_recording_consent(request):
# Fixture for logging in and navigating to appointments
@pytest.fixture(scope='function')
def login_and_navigate_to_appointments(site, care_model, navigate_and_login):
# select_site(site)
# select_care_model(care_model)
# if care_model == "Care Home":
# enter_carehome_name("WHITESTONES CARE HOME")
click_continue_to_record_a_vaccination_homepage()
click_appointments_nav_link()

Expand All @@ -130,10 +126,7 @@ def set_vaccinator_location(site, care_model):

@pytest.fixture(scope='function')
def login_and_navigate_to_homepage(request, navigate_and_login):
#select_site("NEELIMA HOUSE")
#select_care_model("Vaccination Centre")
#click_continue_to_record_a_vaccination_homepage()
pass
click_continue_to_record_a_vaccination_homepage()

# Fixture for logging in and navigating to appointments open first patient
@pytest.fixture(scope='function')
Expand Down Expand Up @@ -162,8 +155,7 @@ def login_and_navigate_to_appointments_open_first_patient(request, navigate_and_

# Fixture for logging in and navigating to find a patient
@pytest.fixture(scope='function')
def login_and_navigate_to_find_a_patient(request, login_and_set_vaccinator_location):
# set_vaccinator_location()
def login_and_navigate_to_find_a_patient(request):
if config["browser"] == "mobile":
if check_nav_link_bar_toggle_exists():
click_nav_link_bar_toggler()
Expand Down
4 changes: 2 additions & 2 deletions features/add_batches.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Feature: Add Batches to vaccine
Then the batch is already added to site warning should appear

Examples:
| site | vaccine | vaccine_type | batch_number |
| NEELIMA HOUSE | COVID-19 | Comirnaty Original/Omicron BA.4-5 | SD7YY2-24 |
| site | vaccine | vaccine_type | batch_number |
| NEELIMA HOUSE | COVID-19 | Spikevax JN.1 | AB2345-Y7890 |
6 changes: 3 additions & 3 deletions features/add_vaccines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Feature: Add vaccine to site
Then the vaccine is already added to site warning should appear

Examples:
| site | vaccine | vaccineType |
| ALBERT HOUSE | COVID-19 | Comirnaty Original/Omicron BA.4-5 |
| ALBERT HOUSE | Flu | Flucelvax Tetra - QIVc |
| site | vaccine | vaccineType |
| ALBERT HOUSE | COVID-19 | Spikevax JN.1 |
| ALBERT HOUSE | Flu | Flucelvax Tetra - QIVc |
6 changes: 3 additions & 3 deletions features/age_based_warnings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Feature: Age based warnings

Examples:
| nhs_number | expected_warning_count | vaccine_type |
| 9732091169 | 4 | covid |
| 9692237893 | 4 | covid |
| 9474335761 | 4 | covid |
| 9732091169 | 3 | covid |
| 9692237893 | 3 | covid |
| 9474335761 | 3 | covid |
| 9450153485 | 3 | covid |
| 9470472918 | 3 | covid |
| 9473673388 | 2 | covid |
38 changes: 19 additions & 19 deletions features/find_a_patient.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ Feature: Find a patient
Then I should be directed to the patient's information page and show <name>, <nhsNumber>, <dateofbirth> and <address> details

Examples:
| nhsNumber | name | dateofbirth | address |
| 9693632109 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW |
| 9732743476 | Mike HEESOM | 24/10/1992 | 2 CHAPEL YARD, BRIGG, S HUMBERSIDE, DN20 8JY |
| 9650594000 | Archie STRAIN | 30/7/2014 | 1 CONINGSBY DRIVE, GRIMSBY, S HUMBERSIDE, DN34 5HQ |
| 9732596996 | Lisa WORTHY | 30/6/2024 | 10 NORTON PARK VIEW, SHEFFIELD, S8 8GS |
| 9449306621 | Not found | 20110509 | KT21 1LJ |
| 9449306605 | Srinivasarao Patel | 03/03/2020 | 4 Calicut Lane2, Line 2, Line 3, SLOUGH, Berkshire, KT21 1EJ |
| 9449306494 | Reynolds Ryan | 27/3/2001 | 40 Queen Street London, EC4R 1DD |
| 9469997956 | SOLOMON DAZLEY | 20160130 | 10 BROOK STREET, LANCASTER, LA1 1SL |
| 9469998626 | JONNY CONOPO | 20150305 | 1 DAISY BANK, LANCASTER, LA1 3JW |
| 9470004272 | JOJO LANE | 20150706 | 10 RAKESMOOR LANE, BARROW-IN-FURNESS, LA14 4LG |
| 9470006143 | TABBY FERN | 20150222 | CLEAR BECK HOUSE, TATHAM, LANCASTER, LA2 8PJ |
| 9470006739 | JANNETTE ARD | 20151209 | 1 ST. MARTINS COURT, CONISTON, CUMBRIA, LA21 8HZ |
| 9470011902 | KATEE TUZZIO | 20150527 | BRIDGE END HOUSE, PARK ROAD, MILNTHORPE, CUMBRIA, LA7 7AN |
| 9470032640 | SYBIL PELLING | 20151217 | 50 ST. GEORGES QUAY, LANCASTER, LA1 1SA |
| nhsNumber | name | dateofbirth | address |
| 9693632109 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW |
| 9732743476 | Mike HEESOM | 24/10/1992 | 2 CHAPEL YARD, BRIGG, S HUMBERSIDE, DN20 8JY |
| 9650594000 | Archie STRAIN | 30/7/2014 | 1 CONINGSBY DRIVE, GRIMSBY, S HUMBERSIDE, DN34 5HQ |
| 9732596996 | Lisa WORTHY | 30/6/2024 | 10 NORTON PARK VIEW, SHEFFIELD, S8 8GS |
| 9449306621 | Not found | 20110509 | KT21 1LJ |
| 9449306605 | Srinivasarao Patel | 03/03/2020 | 4 Calicut Lane2, Line 2, Line 3, SLOUGH, Berkshire, KT21 1EJ |
| 9449306494 | Reynolds Ryan | 27/3/2001 | Jamie Street, Jaketown, KDDTG5, SW16 6JR |
| 9469997956 | SOLOMON DAZLEY | 20160130 | 10 BROOK STREET, LANCASTER, LA1 1SL |
| 9469998626 | JONNY CONOPO | 20150305 | 1 DAISY BANK, LANCASTER, LA1 3JW |
| 9470004272 | JOJO LANE | 20150706 | 10 RAKESMOOR LANE, BARROW-IN-FURNESS, LA14 4LG |
| 9470006143 | TABBY FERN | 20150222 | CLEAR BECK HOUSE, TATHAM, LANCASTER, LA2 8PJ |
| 9470006739 | JANNETTE ARD | 20151209 | 1 ST. MARTINS COURT, CONISTON, CUMBRIA, LA21 8HZ |
| 9470011902 | KATEE TUZZIO | 20150527 | BRIDGE END HOUSE, PARK ROAD, MILNTHORPE, CUMBRIA, LA7 7AN |
| 9470032640 | SYBIL PELLING | 20151217 | 50 ST. GEORGES QUAY, LANCASTER, LA1 1SA |
# | 9449304424 | COMFORT26th Jones | 9/3/2018 | Ifyoucan113, 26TH, KT17 1NA |
# | 9449305552 | Milton Jacob | 4/7/2024 | 12, OATLANDS ROAD, EN3 5LJ |
# | 9449306613 | Briar Anderton | 20/5/1990 | 27 Ryde Vale Road, LONDON, SW12 9JQ |
Expand All @@ -55,8 +55,8 @@ Feature: Find a patient

Examples:
| nhsNumber | errorMessage |
| 123456789 | Minimum number of characters is 10 |
| 9753108642 | Invalid NHS number |
| 123456789 | Enter 10 digits |
| 9753108642 | Enter a correct NHS number |

@findpatient
Scenario Outline: NHS Number: Searching for a patient without a record returns no results
Expand Down Expand Up @@ -203,10 +203,10 @@ Feature: Find a patient
Scenario: Local: Created patient can be found using local search
Given I am on the find a patient by demographics page
And I generate random data for a new patient
And I enter the new patient details
And I enter the new patient details on find by demographics page
And I click the search button
And I click the create a new patient button
And I enter the new patient details
And I enter the new patient details on create a new patient page
When I click the check and confirm button
Then I can check and confirm the patient information is correct
When I click the confirm and save button
Expand Down
Loading

0 comments on commit 20be971

Please sign in to comment.