Skip to content

Commit

Permalink
Ravs 1228 automate user management (#57)
Browse files Browse the repository at this point in the history
* git resolve issue with Bobby tickle test failure

* Added new pages for manage users

* Added new vaccine type test

* Fix failing tests after new vaccine type addition

* Fix failing tests after new vaccine type addition

* Added new test for 1368

* removed png from PR commit

* Added page elements for manage users

* Fix issue with all tests failing

* Zoom to element for capturing screenshot

* Zoom to element for capturing screenshot

* Improved test execution time by fixing the issue when adding vaccine and batch to site

* Removed comments

* Added more screenshots to age based warning tests

* Added more screenshots to age based warning tests

* Added new tests for user management

* Added new tests for user management

* Added new tests for user management

* Added new tests for user management

* Fixed failing test in QA

* Updated slack notifications in workflow

* Updated slack notifications in workflow

* Updated slack notifications in workflow

* Fix failing test in QA

* Added logic to self heal

* Fix all failing tests

* Fix all failing tests

* Added new tests for changing user details

* Fixed failing tests following new screen

---------

Co-authored-by: root <root@FA-0817>
  • Loading branch information
neelimaguntupalli1-nhs and root authored Jan 8, 2025
1 parent 8085b23 commit 9fff088
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
14 changes: 11 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ def navigate_to_ravs(request):

# Fixture for logging in and navigating to find a patient
@pytest.fixture(scope='function')
def login_and_navigate_to_find_a_patient(request):
def login_and_navigate_to_find_a_patient(request, navigate_to_ravs):
if config["browser"] == "mobile":
if check_nav_link_bar_toggle_exists():
click_nav_link_bar_toggler()
if check_navbar_toggle_exists_without_waiting():
click_navbar_toggler()
if check_logout_button_exists_without_waiting():
click_logout_button()
click_login_button()
emailAddress = "[email protected]"
enter_email_address(emailAddress)
password = config["credentials"]["ravs_password"]
enter_password(password)
click_nhs_signin_button()
click_find_a_patient_nav_link()

# Fixture for logging in and finding a patient by NHS number
Expand Down
2 changes: 1 addition & 1 deletion tests/test_age_based_warnings_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def shared_data():
return {}

@given("I am logged into the RAVS app")
def given_I_login_to_the_ravs_web_app(navigate_and_login):
def given_I_login_to_the_ravs_web_app(login_and_navigate_to_find_a_patient):
pass

@when(parse('I search for the patient with NHS number {nhs_number}'))
Expand Down
8 changes: 4 additions & 4 deletions tests/test_find_a_patient_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ def step_given_im_on_pds_search_page(login_and_navigate_to_find_a_patient):
pass

@given('I am on the find a patient by nhs number page')
def step_i_am_on_the_find_a_patient_by_nhs_number_page(navigate_and_login):
def step_i_am_on_the_find_a_patient_by_nhs_number_page(login_and_navigate_to_find_a_patient):
pass

@given('I am on the find a patient by demographics page')
def step_given_i_am_on_the_find_a_patient_by_demographics_page(navigate_and_login):
def step_given_i_am_on_the_find_a_patient_by_demographics_page(login_and_navigate_to_find_a_patient):
click_search_by_demographics_link()

@then('I am on the find a patient by local records page')
@given('I am on the find a patient by local records page')
def step_given_i_am_on_the_find_a_patient_by_local_records_page(navigate_and_login):
def step_given_i_am_on_the_find_a_patient_by_local_records_page(login_and_navigate_to_find_a_patient):
click_search_by_local_records_link()

@given('I click the find a patient by local records link')
Expand All @@ -85,7 +85,7 @@ def step_click_the_find_a_patient_by_local_records_link():
click_search_by_local_records_link()

@given('I am on the create a new patient page')
def step_given_i_am_on_the_find_a_patient_by_local_records_page(navigate_and_login):
def step_given_i_am_on_the_find_a_patient_by_local_records_page(login_and_navigate_to_find_a_patient):
click_search_by_local_records_link()

@then('the find a patient page should be displayed')
Expand Down

0 comments on commit 9fff088

Please sign in to comment.