ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
258 stars 444 forks source link

Add a cypress test to assign a volunteer to a patient #8913

Open nihal467 opened 1 month ago

nihal467 commented 1 month ago

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.
sidpg123 commented 1 month ago

@nihal467 Can I work on this? Please assign it me.

sidpg123 commented 1 month ago

Hi @nihal467 ,

All tasks mentioned in the issue have been completed as per the requirements:

Additionally, I added an id to the banner component for easier targeting.

Please review the changes and let me know if any adjustments are needed.

Thanks!

Patient Details Class:

Image

Test

Image

Added id to banner:

Image

JavidSumra commented 3 weeks ago

Hey @sidpg123 are you working on this issue?

sidpg123 commented 2 weeks ago

@JavidSumra yes, i am working on the issue infact work is almost done , i am waiting for @nihal467 confirmation.

nihal467 commented 2 weeks ago

@sidpg123 for review purpose, raise the PR

nihal467 commented 1 week ago

@sidpg123 unassigning you from the issue due to inactivity

JavidSumra commented 1 week ago

Hey @nihal467 can you please assign this issue to me?

sidpg123 commented 1 week ago

@nihal467 Sorry for my inactivity. I have completed the code, but I forgot to raise a PR. If you give me permission, I will raise it immediately.

bodhish commented 1 week ago

@sidpg123 do raise a PR.