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

Cypress Tests: Added test for updating an existing patient. #5602

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

SahilSingh177
Copy link
Contributor

@SahilSingh177 SahilSingh177 commented Jun 5, 2023

WHAT

Added test that validates whether the patient has been successfully updated by changing/adding the following details:

  • Added data to the present health condition
  • Added ongoing medication data
  • Added data to the allergies
  • In any medical history: selected diabetes & heart disease and input data to their respective text boxes
  • Added insurance details for the patient
  • Updated emergency number and current address

This is followed by checking the dashboard to confirm if the patient has been updated successfully.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

@SahilSingh177 SahilSingh177 requested a review from a team June 5, 2023 09:21
@SahilSingh177 SahilSingh177 requested a review from a team as a code owner June 5, 2023 09:21
@netlify
Copy link

netlify bot commented Jun 5, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 6821a28
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6489825aae8a680008a9417a
😎 Deploy Preview https://deploy-preview-5602--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@vercel
Copy link

vercel bot commented Jun 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2023 9:04am

@nihal467
Copy link
Member

nihal467 commented Jun 6, 2023

@SahilSingh177

  • merge the latest develop branch, the name is already getting edited, and don't edit the address beside that do the below-mentioned process

  • add the following edit to the patient page:

  • add data to the present health condition

  • add ongoing medication data

  • add data to the allergies

  • in any medical history: select diabetes & heart disease and input data to their respective text boxes

  • add insurance details for the patient

  • changes his emergency number and current address

@SahilSingh177
Copy link
Contributor Author

Sure. I'll implement these changes.

@SahilSingh177
Copy link
Contributor Author

SahilSingh177 commented Jun 6, 2023

Hi, @nihal467. I'm having trouble finding the insurance details of a patient in the dashboard. Can you please guide me on where I can locate this information? I need to ensure that the patient's details have been successfully updated.

@nihal467
Copy link
Member

nihal467 commented Jun 6, 2023

@SahilSingh177 Currently, the insurance details are not shown in dashboard, so just add detail of the insurance . no need to verify it

cy.get("[data-testid=name] input").clear().type("Test E2E User Edited");
cy.get("#emergency_phone_number-div button")
.filter(":nth-child(2)")
.click();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling this to clear the emergency phone number.

@SahilSingh177
Copy link
Contributor Author

@nihal467, I have updated the PR with the requested changes. Please review them once and let me know if any further changes are required.

@sonarcloud
Copy link

sonarcloud bot commented Jun 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.3% 4.3% Duplication

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Jun 6, 2023
@vercel
Copy link

vercel bot commented Jun 6, 2023

@SahilSingh177 is attempting to deploy a commit to the Coronasafe Team on Vercel.

A member of the Team first needs to authorize it.

@SahilSingh177 SahilSingh177 force-pushed the Update_Patient_tests branch 5 times, most recently from 5bf50c9 to a4905c7 Compare June 10, 2023 10:34
@SahilSingh177
Copy link
Contributor Author

@nihal467, all the tests are passing now, kindly review them once.

@nihal467
Copy link
Member

nihal467 commented Jun 12, 2023

@SahilSingh177 #5579 The phone number fields will be changed once the PR is merged. After the merge, I will review your PR again and proceed with merging it on or before tomorrow EOD.

@nihal467
Copy link
Member

nihal467 commented Jun 13, 2023

@SahilSingh177 the new field is merged, can you update the test since its failing

@SahilSingh177
Copy link
Contributor Author

Sure. I'll update the tests

Added test that validates whether the patient has been successfully
updated by changing/adding details, and then updating their profile.
This is followed by checking the dashboard to confirm if
the patient has been updated successfully.

Fixes ohcnetwork#4234
@SahilSingh177
Copy link
Contributor Author

@nihal467, I have fixed the test and it's passing cypress run but "Add cypress passed label on success" is failing due to HttpError. I'm not sure what might be causing this.

@nihal467
Copy link
Member

@SahilSingh177 we will look into it, your PR looks good to me

@khavinshankar khavinshankar merged commit 7833d04 into ohcnetwork:develop Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress: Update Existing Patient
3 participants