test(frontend): implement wave 2 api and hook coverage uplift#5193
Merged
test(frontend): implement wave 2 api and hook coverage uplift#5193
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Wave 2 unit-test coverage for high-gap frontend API/hook modules and updates the Wave 2 tracking doc with local coverage deltas.
Changes:
- Added comprehensive unit tests for
useGetAllAgreements(pagination, skip, error paths, cancellation, stable params). - Added unit tests for
useChangeRequests.hookshooks +getChangeRequestsForTooltiphelper across dependency/conditional branches. - Expanded
opsAPItests around agreement query construction, fiscal year normalization, andgetAgreementByIdquery modes; updated Wave 2 tracking doc snapshot.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/hooks/useGetAllAgreements.test.js | New tests for pagination/multi-page behavior, skip, error paths, unmount cancellation, and refetch gating. |
| frontend/src/hooks/useChangeRequests.hooks.test.js | New tests covering multiple hooks and tooltip message builder branches/conditions. |
| frontend/src/api/opsAPI.test.js | Additional tests for agreements query param construction/normalization and getAgreementById arg shapes. |
| docs/developers/frontend/coverage-90/wave-2-issue.md | Marks Wave 2 targets complete and records local coverage deltas + update-draft snippet. |
Comments suppressed due to low confidence (1)
docs/developers/frontend/coverage-90/wave-2-issue.md:29
- The phrase "parent accessibility/quality tracking issue" seems incorrect for this Wave 2 coverage tracking doc. Consider updating it to refer to the parent coverage/quality tracking issue (or the specific parent issue number) to avoid confusion.
## Parent Issue Update Draft
Use this comment on the parent accessibility/quality tracking issue:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
josbell
approved these changes
Mar 4, 2026
weimiao67
approved these changes
Mar 4, 2026
Contributor
|
🎉 This PR is included in version 1.316.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
frontend/src/api/opsAPI.jsfrontend/src/hooks/useChangeRequests.hooks.jsfrontend/src/hooks/useGetAllAgreements.jsdocs/developers/frontend/coverage-90/wave-2-issue.mdIssue
How to test
cd frontendbun run test --watch=false src/api/opsAPI.test.js src/hooks/useChangeRequests.hooks.test.js src/hooks/useGetAllAgreements.test.jsbun run test --watch=falsebun run test:coverage --watch=falsedocs/developers/frontend/coverage-90/wave-2-issue.mdA11y impact
A11Y-SUPPRESSIONmetadata (owner, expires, rationale)Screenshots
Definition of Done Checklist
Links
docs/developers/frontend/coverage-90/wave-2-issue.md