minor tweak and unit test for useGetReferralById hook #33271
+97
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.
Are you removing, renaming or moving a folder in this PR?
If the folder you changed contains a
manifest.json
, search for itsentryName
in the content-build registry.json (theentryName
there will match).If an entry for this folder exists in content-build and you are:
Deleting a folder:
vets-website
for all instances of theentryName
in yourmanifest.json
and remove them in a separate PR. Look particularly for references insrc/applications/static-pages/static-pages-entry.js
andsrc/platform/forms/constants.js
. If you do not do this, other applications will break!Renaming or moving a folder: Update the entry in the registry.json, but do not merge it until your vets-website changes here are merged. The content-build PR must be merged immediately after your vets-website change is merged in to avoid CI errors with content-build (and Tugboat).
Examples of a TeamSite: https://va.gov/health and https://benefits.va.gov/benefits/. This scenario is also referred to as the "injected" header and footer. You can reach out in the
#sitewide-public-websites
Slack channel for questions.Did you change site-wide styles, platform utilities or other infrastructure?
Summary
A minor change to the hook (setting the loading status outside the try block) and complete unit tests for the hook.
Related issue(s)
Refactor fetchReferralById action and complete unit test for useGetReferralById hook va.gov-team#97724
Testing done
Created unit tests
What areas of the site does it impact?
Community Care referral scheduling feature in VAOS
Acceptance criteria
Quality Assurance & Testing
Error Handling