Skip to content

Commit

Permalink
Ravs 961 update record a vaccine tests (#32)
Browse files Browse the repository at this point in the history
* Fixed failing add existing batch test

* Fixed fa

* Fixed assessment page fields

* Fixed consent page fields and site vaccine, batch fields

* Fixed vaccinated page field, giving a first stan now to see if all tests pass

* Fixed failing age based warning tests

* Sorted record a vaccine tests hopefully

* Sorted record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Sorted most of record a vaccine tests hopefully

* Changed browser to be edge

* Updated scan secrets yml

* Updated scan secrets yml and removed timeout as it is not needed

* Added logging for shared_data when  recording a vaccine

* Added logging for shared_data when  recording a vaccine

* Fixed feature file

---------

Co-authored-by: root <root@FA-0817>
  • Loading branch information
neelimaguntupalli1-nhs and root authored Nov 6, 2024
1 parent 55bfb1a commit c994b38
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
-e RAVS_PASSWORD="${{ secrets.RAVS_PASSWORD }}" \
-e HEADLESS_MODE="true" \
-e TEST_ENVIRONMENT="dev" \
-e BROWSER="chrome" \
-e BROWSER="edge" \
-e MARKER="" \
-e AGENTS=3 \
-p 5050:5050 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
-e RAVS_PASSWORD="${{ secrets.RAVS_PASSWORD }}" \
-e HEADLESS_MODE="true" \
-e TEST_ENVIRONMENT="qa" \
-e BROWSER="chrome" \
-e BROWSER="edge" \
-e MARKER="" \
-e AGENTS=3 \
-p 5050:5050 \
Expand Down
7 changes: 7 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,27 +147,34 @@ def click_find_a_patient_and_search_with_nhs_number(nhs_number):

def click_on_patient_name(name):
click_on_patient_name_search_result(name)
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)

def click_find_a_patient_top_nav_bar():
click_find_a_patient_nav_link()
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)

def click_manage_users_top_nav_bar():
click_manage_users_nav_link()
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)

def click_on_patient_search_result_and_click_choose_vaccine(name, vaccine):
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
immunisation_history_records = get_count_of_immunisation_history_records(vaccine)
click_choose_vaccine_button()
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
attach_screenshot("clicked_on_patient_" + name + "_and_clicked_choose_vaccine_button")
return immunisation_history_records

def choose_vaccine_and_vaccine_type_for_patient(site, vaccine, vaccine_type):
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
click_delivery_team_radiobutton(site)
click_vaccine_radiobutton(vaccine)
click_vaccine_type_radiobutton(vaccine_type)
click_continue_to_assess_patient_button()
attach_screenshot("selected_vaccine_" + vaccine + "_and_" + vaccine_type + "_and_clicked_continue_button")

def choose_vaccine_and_vaccine_type_only(site, vaccine, vaccine_type):
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
click_delivery_team_radiobutton(site)
click_vaccine_radiobutton(vaccine)
click_vaccine_type_radiobutton(vaccine_type)
Expand Down
50 changes: 25 additions & 25 deletions features/record_a_vaccine_for_patient_with_nhs_number.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ Feature: Record vaccine

Examples:
| index | nhs_number | site | care_model | eligibility | assess_date | consent | vaccination | vaccination_date | name | dob | address | chosen_vaccine | batch_number | batch_expiry_date |
| 0 | 9693632109 | ALBERT HOUSE | Vaccination Centre | yes | today | yes | yes | today | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | COVID-19 | SDYY2-01 | 19/10/2025 |
| 1 | 9693632109 | BECCLES HOUSE | Vaccination Centre | yes | today-1 | yes | yes | today-1 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | COVID-19 | SDYY2-12B | 19/10/2025 |
| 2 | 9470040228 | BIRCH HOUSE | Hospital Hub | yes | today-1 | yes | yes | today | HERBERT HAAG | 14/12/1922 | 10 COASTAL ROAD, HEST BANK, LANCASTER, LA2 6HN | COVID-19 | SB12345-12A | 19/2/2026 |
| 3 | 9470057589 | ALBERT HOUSE | Care Home | yes | today-2 | yes | yes | today-1 | ROGER SEABORNE | 13/12/1922 | 10 ANN STREET, DALTON-IN-FURNESS, CUMBRIA, LA15 8BG | COVID-19 | SDYY2-13A | 19/10/2026 |
| 4 | 9472710255 | BECCLES HOUSE | Home Of Housebound Patient | yes | today-3 | yes | yes | today-2 | DELICE PINKER | 10/11/1926 | HARDCRAGG HOUSE, HARDCRAGG WAY, GRANGE-OVER-SANDS, CUMBRIA, LA11 6BH | COVID-19 | SDYY2-14A | 19/10/2026 |
| 5 | 9473629885 | BIRCH HOUSE | Off-site Outreach Event | yes | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | COVID-19 | SDYY2-15A | 19/10/2026 |
| 0 | 9693632109 | ALBERT HOUSE | Vaccination Centre open to the public | yes | today | yes | yes | today | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | COVID-19 | SDYY2-01 | 19/10/2025 |
| 1 | 9693632109 | BECCLES HOUSE | Vaccination centre open to the public | yes | today-1 | yes | yes | today-1 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | COVID-19 | SDYY2-12B | 19/10/2025 |
| 2 | 9470040228 | BIRCH HOUSE | Hospital hub for staff and patients | yes | today-1 | yes | yes | today | HERBERT HAAG | 14/12/1922 | 10 COASTAL ROAD, HEST BANK, LANCASTER, LA2 6HN | COVID-19 | SB12345-12A | 19/2/2026 |
| 3 | 9470057589 | ALBERT HOUSE | Care home | yes | today-2 | yes | yes | today-1 | ROGER SEABORNE | 13/12/1922 | 10 ANN STREET, DALTON-IN-FURNESS, CUMBRIA, LA15 8BG | COVID-19 | SDYY2-13A | 19/10/2026 |
| 4 | 9472710255 | BECCLES HOUSE | Housebound patient's home | yes | today-3 | yes | yes | today-2 | DELICE PINKER | 10/11/1926 | HARDCRAGG HOUSE, HARDCRAGG WAY, GRANGE-OVER-SANDS, CUMBRIA, LA11 6BH | COVID-19 | SDYY2-14A | 19/10/2026 |
| 5 | 9473629885 | BIRCH HOUSE | Outreach event | yes | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | COVID-19 | SDYY2-15A | 19/10/2026 |
| 6 | 9437540233 | ALBERT HOUSE | Vaccination Centre | yes | today-5 | yes | yes | today-2 | RANDY FOGDEN | 8/6/1961 | 10 ASHVILLE TERRACE, MANCHESTER, M40 9WG | COVID-19 | SDYY2-16A | 19/10/2026 |
| 7 | 9474374228 | BECCLES HOUSE | Hospital Hub | yes | today-6 | yes | yes | today-3 | ORINDA JUDD | 20/7/1963 | 2 RECTORY PADDOCK, HALTON, LANCASTER, LA2 6LL | COVID-19 | SDYY2-17A | 19/10/2026 |
| 8 | 9437580812 | BIRCH HOUSE | Care Home | yes | today-7 | yes | yes | today-7 | INDIGO CATCHESIDE | 1/3/1959 | 12 CANBERRA STREET, MANCHESTER, M11 4WL | COVID-19 | SDYY2-18A | 19/10/2026 |
| 9 | 9437599165 | ALBERT HOUSE | Home Of Housebound Patient | yes | today-30 | yes | yes | today-30 | CAWRDAV BOBBETT | 21/7/1959 | 127 ALINORA CRESCENT, GORING-BY-SEA, WORTHING, W SUSSEX, BN12 4HN | COVID-19 | SDYY2-18B | 19/10/2026 |
| 10 | 9474335052 | BECCLES HOUSE | Off-site Outreach Event | yes | today-2 | yes | yes | today-2 | AMERY PIGGOTT | 20/4/1968 | 10 CONNAUGHT ROAD, LANCASTER, LA1 4BQ | COVID-19 | SDYY2-18C | 19/10/2026 |
| 7 | 9474374228 | BECCLES HOUSE | Hospital hub for staff and patients | yes | today-6 | yes | yes | today-3 | ORINDA JUDD | 20/7/1963 | 2 RECTORY PADDOCK, HALTON, LANCASTER, LA2 6LL | COVID-19 | SDYY2-17A | 19/10/2026 |
| 8 | 9437580812 | BIRCH HOUSE | Care home | yes | today-7 | yes | yes | today-7 | INDIGO CATCHESIDE | 1/3/1959 | 12 CANBERRA STREET, MANCHESTER, M11 4WL | COVID-19 | SDYY2-18A | 19/10/2026 |
| 9 | 9437599165 | ALBERT HOUSE | Housebound patient's home | yes | today-30 | yes | yes | today-30 | CAWRDAV BOBBETT | 21/7/1959 | 127 ALINORA CRESCENT, GORING-BY-SEA, WORTHING, W SUSSEX, BN12 4HN | COVID-19 | SDYY2-18B | 19/10/2026 |
| 10 | 9474335052 | BECCLES HOUSE | Outreach event | yes | today-2 | yes | yes | today-2 | AMERY PIGGOTT | 20/4/1968 | 10 CONNAUGHT ROAD, LANCASTER, LA1 4BQ | COVID-19 | SDYY2-18C | 19/10/2026 |
| 11 | 9437541817 | BIRCH HOUSE | Vaccination Centre | yes | today-3 | yes | yes | today-1 | FLORINDA DUNNER | 27/3/1957 | 32 HOLLAND ROAD, MANCHESTER, M8 4NP | COVID-19 | SDYY2-18D | 19/10/2026 |
| 12 | 9437540233 | ALBERT HOUSE | Hospital Hub | yes | today-15 | yes | yes | today-7 | RANDY FOGDEN | 8/6/1961 | 10 ASHVILLE TERRACE, MANCHESTER, M40 9WG | COVID-19 | SDYY2-18E | 19/10/2026 |
| 8 | 9474376638 | BECCLES HOUSE | Care Home | yes | today-32 | yes | yes | today-30 | PHYLLIDA ZYLKO | 6/2/1968 | BELL FARM BUNGALOW, CATON GREEN, BROOKHOUSE, LANCASTER, LA2 9JG | Flu | SDYY2-18F | 19/10/2026 |
| 9 | 9474405174 | BIRCH HOUSE | Home Of Housebound Patient | yes | today | yes | yes | today | PHINEAS FAYLE | 4/9/1965 | 2 DIXON TERRACE, NETHER KELLET, CARNFORTH, LANCS, LA6 1EX | Flu | SDYY2-19A | 19/10/2026 |
| 10 | 9474405174 | ALBERT HOUSE | Off-site Outreach Event | yes | today-2 | yes | yes | today | PHINEAS FAYLE | 4/9/1965 | 2 DIXON TERRACE, NETHER KELLET, CARNFORTH, LANCS, LA6 1EX | Flu | SDYY2-14B | 5/5/2025 |
| 12 | 9437540233 | ALBERT HOUSE | Hospital hub for staff and patients | yes | today-15 | yes | yes | today-7 | RANDY FOGDEN | 8/6/1961 | 10 ASHVILLE TERRACE, MANCHESTER, M40 9WG | COVID-19 | SDYY2-18E | 19/10/2026 |
| 8 | 9474376638 | BECCLES HOUSE | Care home | yes | today-32 | yes | yes | today-30 | PHYLLIDA ZYLKO | 6/2/1968 | BELL FARM BUNGALOW, CATON GREEN, BROOKHOUSE, LANCASTER, LA2 9JG | Flu | SDYY2-18F | 19/10/2026 |
| 9 | 9474405174 | BIRCH HOUSE | Housebound patient's home | yes | today | yes | yes | today | PHINEAS FAYLE | 4/9/1965 | 2 DIXON TERRACE, NETHER KELLET, CARNFORTH, LANCS, LA6 1EX | Flu | SDYY2-19A | 19/10/2026 |
| 10 | 9474405174 | ALBERT HOUSE | Outreach event | yes | today-2 | yes | yes | today | PHINEAS FAYLE | 4/9/1965 | 2 DIXON TERRACE, NETHER KELLET, CARNFORTH, LANCS, LA6 1EX | Flu | SDYY2-14B | 5/5/2025 |
| 11 | 9450134391 | BECCLES HOUSE | Vaccination Centre | yes | today-3 | yes | yes | today | MARIAN PIESSE | 17/7/1994 | 2 BIRCH STREET, LYTHAM ST. ANNES, LANCS, FY8 5DT | Flu | SDYY2-14C | 19/10/2026 |
| 12 | 9450140960 | BIRCH HOUSE | Hospital Hub | yes | today-1 | yes | yes| today | DEANA GAMBLES | 5/9/1993 | 10 GRASMERE ROAD, LYTHAM ST. ANNES, LANCS, FY8 2HZ | Flu | SDYY2-20A | 19/10/2026 |
| 1 | 9450141444 | ALBERT HOUSE | Care Home | yes | today-4 | yes | yes | today-2 | BRANDIE DYBLE | 25/8/1992 | 49 BLACKPOOL ROAD NORTH, LYTHAM ST. ANNES, LANCS, FY8 3DF | Flu | SDYY2-21A | 5/5/2025 |
| 2 | 9450141711 | BECCLES HOUSE | Home Of Housebound Patient | yes | today-2| yes | yes | today-1 | KRISTIA SIDAWAY | 24/6/1992 | 41 BALTIMORE ROAD, LYTHAM ST. ANNES, LANCS, FY8 3NY | Flu | SDYY2-22A | 5/5/2025 |
| 3 | 9450144699 | BIRCH HOUSE | Off-site Outreach Event | yes | today-1 | yes | yes | today-1 | HOPE TULLY | 10/1/1993 | 2 CHAPEL CLOSE, WESHAM, PRESTON, PR4 3HB | Flu | SDYY2-23A | 19/10/2026 |
| 4 | 9437541817 | ALBERT HOUSE | Off-site Outreach Event | yes | today | yes | yes | today | FLORINDA DUNNER | 27/3/1957 | 32 HOLLAND ROAD, MANCHESTER, M8 4NP | Flu | SDYY2-24A | 5/5/2025 |
| 12 | 9450140960 | BIRCH HOUSE | Hospital hub for staff and patients | yes | today-1 | yes | yes| today | DEANA GAMBLES | 5/9/1993 | 10 GRASMERE ROAD, LYTHAM ST. ANNES, LANCS, FY8 2HZ | Flu | SDYY2-20A | 19/10/2026 |
| 1 | 9450141444 | ALBERT HOUSE | Care home | yes | today-4 | yes | yes | today-2 | BRANDIE DYBLE | 25/8/1992 | 49 BLACKPOOL ROAD NORTH, LYTHAM ST. ANNES, LANCS, FY8 3DF | Flu | SDYY2-21A | 5/5/2025 |
| 2 | 9450141711 | BECCLES HOUSE | Housebound patient's home | yes | today-2| yes | yes | today-1 | KRISTIA SIDAWAY | 24/6/1992 | 41 BALTIMORE ROAD, LYTHAM ST. ANNES, LANCS, FY8 3NY | Flu | SDYY2-22A | 5/5/2025 |
| 3 | 9450144699 | BIRCH HOUSE | Outreach event | yes | today-1 | yes | yes | today-1 | HOPE TULLY | 10/1/1993 | 2 CHAPEL CLOSE, WESHAM, PRESTON, PR4 3HB | Flu | SDYY2-23A | 19/10/2026 |
| 4 | 9437541817 | ALBERT HOUSE | Outreach event | yes | today | yes | yes | today | FLORINDA DUNNER | 27/3/1957 | 32 HOLLAND ROAD, MANCHESTER, M8 4NP | Flu | SDYY2-24A | 5/5/2025 |

@recordvaccine
Scenario Outline: Record a maternity vaccine with nhs number
Given I login to RAVS and set vaccinator details with <site> and <care_model> and get patient details for <nhs_number> with option <index> and choose to vaccinate with vaccine details as <chosen_vaccine>, <vaccine_type>, <batch_number> with <batch_expiry_date>
And I search for a patient with the NHS number in the find a patient screen
And I open the patient record by clicking on patient <name>
When I click choose vaccine button and choose the <chosen_vaccine>, <vaccine_type>, <batch_number> with <batch_expiry_date> and click continue
When I click choose vaccine button and choose the <chosen_vaccine>, <batch_number> with <batch_expiry_date> and click continue
And I assess the pregnant patient's <eligibility> with the details of due date as <due_date> and assessment date as <assess_date> and click continue to record consent screen button
And I record <consent> with the details and click continue to vaccinate button
And I record <vaccination> details and date as <vaccination_date> and click Continue to Check and confirm screen
Expand All @@ -56,10 +56,10 @@ Feature: Record vaccine
And the immunisation history of the patient should be updated in the patient details page

Examples:
| index | nhs_number | site | care_model | eligibility | due_date | assess_date | consent | vaccination | vaccination_date | name | dob | address | chosen_vaccine | vaccine_type | batch_number | batch_expiry_date |
| 4 | 9473629885 | KINGSTON HOUSE | Off-site Outreach Event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | Arexvy | RSVTEST2 | 31/12/2025 |
| index | nhs_number | site | care_model | eligibility | due_date | assess_date | consent | vaccination | vaccination_date | name | dob | address | chosen_vaccine | batch_number | batch_expiry_date |
| 4 | 9473629885 | KINGSTON HOUSE | Outreach event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | RSVTEST2 | 31/12/2025 |
# | 0 | 9693632109 | ALBERT HOUSE | Vaccination Centre | yes | today | today | yes | yes | today | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | Pertussis | Adacel vaccine suspension | ADAC1-27 | 19/10/2027 |
# | 1 | 9693632109 | BECCLES HOUSE | Vaccination Centre | yes | today+100 | today-1 | yes | yes | today-1 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | Pertussis | Boostrix-IPV suspension | BST01-28B | 19/10/2028 |
# | 2 | 9470040228 | BIRCH HOUSE | Hospital Hub | yes | today+290 | today-1 | yes | yes | today | HERBERT HAAG | 14/12/1922 | 10 COASTAL ROAD, HEST BANK, LANCASTER, LA2 6HN | Pertussis | Repevax vaccine suspension | REPE11-29A | 19/2/2029 |
# | 3 | 9472710255 | ALBERT HOUSE | Home Of Housebound Patient | yes | today+5 | today-3 | yes | yes | today-2 | DELICE PINKER | 10/11/1926 | HARDCRAGG HOUSE, HARDCRAGG WAY, GRANGE-OVER-SANDS, CUMBRIA, LA11 6BH | Respiratory syncytial virus (RSV) | Abrysvo | ABRY2-14A | 19/10/2026 |
# | 4 | 9473629885 | BECCLES HOUSE | Off-site Outreach Event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | Arexvy | AREX2-15A | 19/10/2026 |
# | 2 | 9470040228 | BIRCH HOUSE | Hospital hub for staff and patients | yes | today+290 | today-1 | yes | yes | today | HERBERT HAAG | 14/12/1922 | 10 COASTAL ROAD, HEST BANK, LANCASTER, LA2 6HN | Pertussis | Repevax vaccine suspension | REPE11-29A | 19/2/2029 |
# | 3 | 9472710255 | ALBERT HOUSE | Housebound patient's home | yes | today+5 | today-3 | yes | yes | today-2 | DELICE PINKER | 10/11/1926 | HARDCRAGG HOUSE, HARDCRAGG WAY, GRANGE-OVER-SANDS, CUMBRIA, LA11 6BH | Respiratory syncytial virus (RSV) | Abrysvo | ABRY2-14A | 19/10/2026 |
# | 4 | 9473629885 | BECCLES HOUSE | Outreach event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | Arexvy | AREX2-15A | 19/10/2026 |
2 changes: 2 additions & 0 deletions pages/find_a_patient_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ def check_patient_postcode_search_result_exists(postcode, wait):

def check_patient_nhs_number_search_result_exists(nhsNumber, wait):
element = ("role", "cell", nhsNumber)
time.sleep(2)
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
wait_for_element_to_appear(element)
return check_element_exists(element, wait)

def check_patient_not_found_for_nhs_number_message_exists(nhsNumber, wait):
element = ("role", "heading", f"No result found for {nhsNumber}")
time.sleep(2)
wait_for_element_to_disappear(PAGE_LOADING_ELEMENT)
wait_for_element_to_appear(element)
return check_element_exists(element, wait)
Expand Down
2 changes: 1 addition & 1 deletion test_data/models/rsv_vaccine_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rsv_vaccine_types = [
"Abrysvo",
"Arexvy ",
"Arexvy",
]
Loading

0 comments on commit c994b38

Please sign in to comment.