Skip to content

Commit

Permalink
deploy: 8577c9f
Browse files Browse the repository at this point in the history
  • Loading branch information
neelimaguntupalli1-nhs committed Nov 15, 2024
1 parent cba6451 commit 01d7f0a
Show file tree
Hide file tree
Showing 575 changed files with 23,097 additions and 4,138 deletions.
Binary file modified allure-report.tar.gz
Binary file not shown.
70 changes: 66 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,30 @@ def click_manage_users_top_nav_bar():
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)
attach_screenshot("immunisation_history_records_count_is_" + immunisation_history_records)
click_choose_vaccine_button()
attach_screenshot("clicked_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)
attach_screenshot("clicked_delivery_team")
click_vaccine_radiobutton(vaccine)
attach_screenshot("clicked_vaccine")
click_vaccine_type_radiobutton(vaccine_type)
attach_screenshot("clicked_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)
attach_screenshot("clicked_delivery_team")
click_vaccine_radiobutton(vaccine)
attach_screenshot("clicked_vaccine")
click_vaccine_type_radiobutton(vaccine_type)
attach_screenshot("selected_vaccine_" + vaccine + "_and_" + vaccine_type)

Expand All @@ -190,6 +197,7 @@ def check_vaccine_and_batch_exists_in_site(site, vaccine, vaccine_type, batch_nu
click_nav_link_bar_toggler()

click_vaccines_nav_link()
attach_screenshot("clicked_vaccines_nav_link")
check_site_vaccine_type_has_active_batch(site, vaccine, vaccine_type, batch_number, expiry_date)

def check_site_vaccine_type_has_active_batch(site, vaccine, vaccine_type, batch_number, expiry_date):
Expand Down Expand Up @@ -223,76 +231,99 @@ def check_site_vaccine_type_has_active_batch(site, vaccine, vaccine_type, batch_
def add_site_vaccine(site, vaccine, vaccine_type, batch_number, expiry_date):
# vaccines_page
click_add_vaccine_button()
attach_screenshot("clicked_add_vaccine_button")

# vaccines_choose_site_page
enter_site_name(site)
attach_screenshot("entered_site_name")
select_site_from_list(site)
attach_screenshot("selected_site_from_list")
click_continue_to_add_vaccine_button()
attach_screenshot("clicked_continue_to_add_vaccine_button")

# choose_vaccine_page
click_vaccine_radiobutton_on_add_vaccine_screen(vaccine)
attach_screenshot("clicked_vaccine_radiobutton_on_add_vaccine_screen")
click_vaccine_type_radiobutton_on_add_vaccine_screen(vaccine_type)
attach_screenshot("clicked_vaccine_type_radiobutton_on_add_vaccine_screen")
click_continue_to_add_batch_button()
attach_screenshot("clicked_continue_to_add_batch_button")

# vaccines_add_batch_page
enter_batch_number(batch_number)
attach_screenshot("entered_batch_number")
enter_expiry_date(expiry_date)
attach_screenshot("entered_expiry_date")
click_continue_to_confirm_batch_details_button()
attach_screenshot("clicked_continue_to_confirm_batch_details_button")

# vaccines_check_and_confirm_page
click_confirm_add_vaccine_and_batch_button()
attach_screenshot("clicked_confirm_add_vaccine_and_batch_button")

def add_vaccine_type_batch(batch_number, expiry_date):
click_add_batch_link()
attach_screenshot("clicked_add_batch_link")
enter_batch_number(batch_number)
attach_screenshot("entered_batch_number")
enter_expiry_date(expiry_date)
attach_screenshot("entered_expiry_date")
click_continue_to_confirm_batch_details_button()
attach_screenshot("clicked_continue_to_confirm_batch_details_button")

# vaccines_check_and_confirm_page
click_confirm_add_vaccine_and_batch_button()
attach_screenshot("clicked_confirm_add_vaccine_and_batch_button")

def assess_patient_with_details_and_click_continue_to_consent(eligible_decision, eligibility_type, staff_role, assessing_clinician, due_date, assessment_date, legal_mechanism, assessment_outcome, assessment_comments, eligibility_assessment_no_vaccine_given_reason=None):

if eligible_decision.lower() == 'yes':
click_eligible_yes_radiobutton()
attach_screenshot("clicked_eligible_yes_radiobutton")

if check_eligibility_type_is_enabled():
select_eligibility_type(eligibility_type)
attach_screenshot("selected_eligibility_type")

if eligibility_type == "Healthcare workers":
select_staff_role(staff_role)
attach_screenshot("selected_staff_role")

if eligibility_type == "Pregnancy" and due_date:
enter_due_date(due_date)
attach_screenshot("entered_due_date")

attach_screenshot("clicked_eligibility_yes_and_selected_eligibility_type")
else:
click_eligible_no_radiobutton()
attach_screenshot("clicked_patient_not_eligible_radiobutton")

set_assessment_date(assessment_date)
attach_screenshot("set_assessment_date")
click_legal_mechanism(legal_mechanism)
attach_screenshot("clicked_legal_mechanism")

logging.debug("Assess clinician to select is: " + assessing_clinician)
logging.debug("Assess legal mechanism is: " + legal_mechanism)

select_assessing_clinician_with_name_and_council(assessing_clinician)
attach_screenshot("selected_assessing_clinician_with_name_and_council")

if assessment_outcome.lower() == "give vaccine":
click_give_vaccine_radiobutton()
attach_screenshot("clicked_patient_give_vaccine_radio_button")
else:
click_vaccine_not_given_radiobutton()
attach_screenshot("clicked_vaccine_not_given_radiobutton")
select_assessment_no_vaccination_reason(eligibility_assessment_no_vaccine_given_reason)
attach_screenshot("select_patient_not_given_vaccine_after_assessing")
attach_screenshot("selected_patient_not_given_reason_vaccine_after_assessing")
click_save_and_return_button_on_assessment_screen()
attach_screenshot("clicked_save_and_return_on_assessment_screen")

enter_comments_for_assessing_patient(assessment_comments)
attach_screenshot("entered_comments_for_assessing_patient")
click_continue_to_record_consent_button()
attach_screenshot("clicked_continue_to_record_consent_button")


def record_consent_details_and_click_continue_to_vaccinate(consent_decision, consent_given_by, person_consenting_name, relationship_to_patient, consent_clinician, legal_mechanism, no_consent_reason=None):
attach_screenshot("before_selecting_consent_clinician")

Expand All @@ -301,21 +332,28 @@ def record_consent_details_and_click_continue_to_vaccinate(consent_decision, co

if (legal_mechanism) != "Patient Group Direction (PGD)":
select_consent_clinician_with_name_and_council(consent_clinician)
attach_screenshot("selected_consent_clinician_with_name_and_council")

if consent_decision.lower() == 'yes':
click_yes_to_consent()
attach_screenshot("clicked_yes_to_consent")
select_consent_given_by_from_dropdown(consent_given_by)
attach_screenshot("selected_consent_given_by_from_dropdown")

if consent_given_by != "Patient (informed consent)":
enter_person_consenting_details(person_consenting_name)
attach_screenshot("entered_person_consenting_details")
enter_relationship_to_patient(relationship_to_patient)
add_vaccine_type_batch("entered_relationship_to_patient")
click_continue_to_vaccinate_button()
attach_screenshot("clicked_continue_to_vaccinate_button")
else:
click_no_to_consent()
attach_screenshot("clicked_no_to_consent")

if no_consent_reason is not None:
select_reason_for_no_consent(no_consent_reason)
attach_screenshot("selected_reason_for_no_consent")

attach_screenshot("patient_decided_to_not_consent")
click_save_and_return_button_on_record_consent_page()
Expand All @@ -324,33 +362,51 @@ def record_consent_details_and_click_continue_to_vaccinate(consent_decision, co
def enter_vaccine_details_and_click_continue_to_check_and_confirm(vaccinate_decision, care_model, vaccination_date, vaccine, vaccine_type2, vaccination_site, batch_number, batch_expiry_date, dose_amount, vaccinator, vaccination_comments, legal_mechanism, no_vaccination_reason=None):
if vaccinate_decision.lower() == 'yes':
click_yes_vaccinated_radiobutton()
attach_screenshot("clicked_yes_vaccinated_radiobutton")

click_vaccine_type(vaccine_type2)
attach_screenshot("clicked_vaccine_type")
set_vaccination_date(vaccination_date)
attach_screenshot("vaccination_date_is_set")
click_care_model_option(care_model)
attach_screenshot("clicked_care_model_option")
if care_model == "Care home":
enter_care_home_details("WHITESTONES CARE HOME")
attach_screenshot("entered_care_home_details")
logging.debug("Vaccination legal mechanism is: " + legal_mechanism)
logging.debug("Vaccinator to select is: " + vaccinator)
if (legal_mechanism) != "Patient Group Direction (PGD)":
select_vaccinator_name_and_council(vaccinator)
attach_screenshot("selected_vaccinator_name_and_council")
enter_vaccination_comments(vaccination_comments)
attach_screenshot("entered_vaccination_comments")
select_vaccination_site(vaccination_site)
attach_screenshot("selected_vaccination_site")
batch_number_to_select = batch_number.upper() + " - " + batch_expiry_date
logging.debug("Batch number to select is: " + batch_number_to_select)
select_batch_number(batch_number_to_select)
attach_screenshot("selected_batch_number")
enter_dose_amount_value(dose_amount)
attach_screenshot("entered_dose_amount_value")

if click_continue_to_check_and_confirm_screen_button() == True:
vaccination_date = format_date(vaccination_date, "safari")
set_vaccination_date(vaccination_date)
attach_screenshot("vaccination_date_is_set")
select_batch_number(batch_number_to_select)
attach_screenshot("selected_batch_number")

click_continue_to_check_and_confirm_screen_button()
attach_screenshot("clicked_continue_to_check_and_confirm_screen_button")

else:
click_not_vaccinated_radiobutton()
attach_screenshot("clicked_not_vaccinated_radiobutton")
if no_vaccination_reason is not None:
select_reason_for_no_vaccination(no_vaccination_reason)
attach_screenshot("selected_reason_for_no_vaccination")
click_save_and_return_button_on_record_vaccinated_page
attach_screenshot("patient_decided_to_not_vaccinate")
attach_screenshot("clicked_save_and_return_button_on_record_vaccinated_page")
click_save_and_return_button_on_record_vaccinated_page()
attach_screenshot("patient_decided_to_not_vaccinate_saved_and_returned")

Expand All @@ -360,11 +416,17 @@ def navigate_and_login_with_username(username):
click_navbar_toggler()
if check_logout_button_exists_without_waiting():
click_logout_button()
attach_screenshot("clicked_logout_button")
url = get_app_url(config["test_environment"])
navigate_to_ravs_login_page(url)
attach_screenshot("navigated_to_ravs_login_page")
click_login_button()
attach_screenshot("clicked_login_button")
emailAddress = username
enter_email_address(emailAddress)
attach_screenshot("entered_email_address")
password = config["credentials"]["ravs_password"]
enter_password(password)
attach_screenshot("entered_password")
click_nhs_signin_button()
attach_screenshot("clicked_nhs_signin_button")
Binary file added data/attachments/104d67780da649be.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/1095c40a24799715.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions data/attachments/112f3ce17047711a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
INFO root:conftest.py:48 EDGE browser version is : 131.0.2903.48
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I am on the find a patient by demographics page': [<FixtureDef argname='pytestbdd_stepdef_given_I am on the find a patient by demographics page' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I enter the mandatory patient details Bill, Garton, and 23/12/1946': [<FixtureDef argname='pytestbdd_stepdef_given_I enter the mandatory patient details {firstName}, {lastName}, and {dob}' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_add_mandatory_patient_information.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 50}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_add_mandatory_patient_information.png
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I enter the postcode DN18 5DW': [<FixtureDef argname='pytestbdd_stepdef_given_I enter the postcode {postcode}' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_enter_invalid_postcode.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 270}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_enter_invalid_postcode.png
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I select the gender Male': [<FixtureDef argname='pytestbdd_stepdef_given_I select the gender {gender}' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_select_gender.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 270}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_select_gender.png
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_when_I click the search button': [<FixtureDef argname='pytestbdd_stepdef_when_I click the search button' scope='function' baseid='tests/test_find_a_patient_steps.py'>, <FixtureDef argname='pytestbdd_stepdef_when_I click the search button_1' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_then_I can see a message that no results are found for the patient': [<FixtureDef argname='pytestbdd_stepdef_then_I can see a message that no results are found for the patient' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_no_results_found_should_be_visible.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 611}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_no_results_found_should_be_visible.png
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_then_I can see an option to create a new patient': [<FixtureDef argname='pytestbdd_stepdef_then_I can see an option to create a new patient' scope='function' baseid='tests/test_find_a_patient_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_check_create_new_patient_button_is_visible.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 611}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_check_create_new_patient_button_is_visible.png
Binary file added data/attachments/12273caa5aaae9f9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/12a8697704802eb6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions data/attachments/132bac5cbad6f514.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
INFO root:conftest.py:48 EDGE browser version is : 131.0.2903.48
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I access the ravs web app': [<FixtureDef argname='pytestbdd_stepdef_given_I access the ravs web app' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_then_the login button should be visible': [<FixtureDef argname='pytestbdd_stepdef_then_the login button should be visible' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_login_should_be_visible.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 0}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_login_should_be_visible.png
Binary file added data/attachments/13ab0b28545e9c48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/13fb7c69fdebb33c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/1421b25e02e0c199.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/145853c10da8fa8e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/145f5bd881329b2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/14694338cf163bdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions data/attachments/1507c0a86d474d51.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
INFO root:conftest.py:48 EDGE browser version is : 131.0.2903.48
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_given_I access the ravs web app': [<FixtureDef argname='pytestbdd_stepdef_given_I access the ravs web app' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_when_I click on the log in button': [<FixtureDef argname='pytestbdd_stepdef_when_I click on the log in button' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_when_I provide the [email protected] and pass': [<FixtureDef argname='pytestbdd_stepdef_when_I provide the {emailAddress} and {password}' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_when_the NHS sign in button is clicked': [<FixtureDef argname='pytestbdd_stepdef_when_the NHS sign in button is clicked' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG pytest_bdd.scenario:scenario.py:146 Adding providers for fixture 'pytestbdd_stepimpl_then_sign in should pass': [<FixtureDef argname='pytestbdd_stepdef_then_sign in should {status}' scope='function' baseid='tests/test_login_steps.py'>]
DEBUG root:init_helpers.py:102 Directory verified: /app/data/attachments
DEBUG root:init_helpers.py:108 Saving screenshot to: /app/data/attachments/qa_edge_131.0.2903.48_sign_in_should_pass.png
DEBUG root:playwrightHelper.py:108 Scrolling to mouse position: {'x': 0, 'y': 0}
DEBUG root:init_helpers.py:114 Screenshot attached at: /app/data/attachments/qa_edge_131.0.2903.48_sign_in_should_pass.png
Binary file added data/attachments/15231152433e9ff8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/16359dcfd5576b16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/1640d077a6898bbd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/attachments/16cad8749c0622b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 01d7f0a

Please sign in to comment.