Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #7058
nihal467 opened this issue Oct 24, 2024 · 9 comments
Closed
Tracked by #7058

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

nihal467 opened this issue Oct 24, 2024 · 9 comments
Assignees

Comments

@nihal467
Copy link
Member

nihal467 commented Oct 24, 2024

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 nihal467 changed the title assign to a volunteer function Add a cypress test to assign a volunteer to a patient Oct 24, 2024
@sidpg123
Copy link

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

@sidpg123
Copy link

Hi @nihal467 ,

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

  • Created a new Cypress test under patient_spec/PatientVolunteer.cy.ts to assign a volunteer to an existing live patient.
  • Since there wasn’t an existing class for the Patient Details page, I created one PatientDetails.ts and added required functions.
  • Replace Existing Volunteer: Tested replacing an existing volunteer and verified the updated name appears in the banner.
  • Remove Volunteer: Verified that removing the volunteer hides the banner as expected.

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
Copy link
Contributor

Hey @sidpg123 are you working on this issue?

@sidpg123
Copy link

sidpg123 commented Nov 7, 2024

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

@nihal467
Copy link
Member Author

nihal467 commented Nov 7, 2024

@sidpg123 for review purpose, raise the PR

@nihal467
Copy link
Member Author

@sidpg123 unassigning you from the issue due to inactivity

@JavidSumra
Copy link
Contributor

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

@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 19, 2024
@Jacobjeevan Jacobjeevan removed question Further information is requested needs-triage labels Nov 19, 2024
@Jacobjeevan Jacobjeevan added this to Care Nov 19, 2024
@github-project-automation github-project-automation bot moved this to Triage in Care Nov 19, 2024
@Jacobjeevan Jacobjeevan moved this from Triage to Up Next in Care Nov 19, 2024
@sidpg123
Copy link

@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
Copy link
Member

bodhish commented Nov 19, 2024

@sidpg123 do raise a PR.

@Jacobjeevan Jacobjeevan assigned sidpg123 and unassigned JavidSumra Dec 24, 2024
@rithviknishad rithviknishad closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2024
@github-project-automation github-project-automation bot moved this from Up Next to Done in Care Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants