-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(diagnoses): adds ability to view a diagnosis #2504
feat(diagnoses): adds ability to view a diagnosis #2504
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/A8LC6wUSrZEyJNa3KZ6BA8zodRgR |
One bug that I noticed: the diagnosis tab does not highlight when viewing a diagnosis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be all set if you address the comments made by @jackcmeyer
@jackcmeyer All of the changes that you requested were addressed. One issue that I noticed with similar tests for react-query hooks like |
5725056
to
2db5ea9
Compare
This PR has been updated to resolve merge conflicts with RTL @jackcmeyer @blestab |
@anthonyaperez sorry about delay, but the project is unfortunately back in a "frozen state". can you align your PR with the master? |
In the Diagnoses tab, the diagnosis list was replaced with a table containing the name and dates for the diagnoses, along with a button that allows a read-permission user to view each diagnosis form in its entirety. The same routing is also applied to the smaller diagnosis table above all of the patient tabs. Some of the corresponding test files were added or changed to accommodate for this new feature.
Removes a header tag that appears in the Diagnoses component if a diagnosis form attempts to be viewed but its content is not found.
New tests were added to test the behavior of the useDiagnosis hook, the routing of the onRowClick event handler, and the loading component for viewing a diagnosis. Some code was also refactored to simplify the logic of the rendering. Lastly, a bug that prevented the Diagnoses tab from being highlighted when viewing a diagnosis was also fixed.
Due to the refactor from Enzyme to React Testing Library that occurred across HospitalRun's entire front-end codebase, this commit ensures that the new tests are also updated accordingly.
2db5ea9
to
1a77d00
Compare
@tehkapa Done! |
Fixes #2129.
Changes proposed in this pull request:
Newly added dependencies with Bundlephobia links: