care_fe icon indicating copy to clipboard operation
care_fe copied to clipboard

Add a cypress test to assign a volunteer to a patient

Open nihal467 opened this issue 4 months ago • 2 comments

Description

Add a new cypress test to assign a volunteer to an existing live patient

General Note

  1. Follow the Page Object Model (POM) approach. : reference
  2. Refer to commands.ts in the Cypress folder to understand existing reusable components.
  3. Use proper function names for easier code review. 4.Since there's nothing related to volunteers currently, create a new file named PatientVolunteer.cy.ts under the patient_spec folder.

Steps to Assign a volunteer

  1. Go to the patient tab
  2. click on any live patient card
  3. On the patient consultation page, click the Patient Details button in the top-right corner
  4. Once the new page loads, scroll down to the Assign New Volunteer button.
  5. Assign a new volunteer to the patient.
  6. Ensure the newly added volunteer's name is displayed as a banner at the top of the patient details page.

Make sure to verify the below things

  1. Ensure the normal workflow is functional.
  2. Replace the existing volunteer with a new one and verify the banner shows the new volunteer's name.
  3. When the volunteer is removed and left blank, verify that the banner is no longer displayed.

nihal467 avatar Oct 24 '24 07:10 nihal467