Skip to content

test(frontend): implement wave 2 api and hook coverage uplift#5193

Merged
fpigeonjr merged 4 commits intomainfrom
OPS-codex/wave2-coverage-api-hooks
Mar 4, 2026
Merged

test(frontend): implement wave 2 api and hook coverage uplift#5193
fpigeonjr merged 4 commits intomainfrom
OPS-codex/wave2-coverage-api-hooks

Conversation

@fpigeonjr
Copy link
Copy Markdown
Contributor

@fpigeonjr fpigeonjr commented Mar 3, 2026

What changed

  • Added Wave 2 test coverage for:
    • frontend/src/api/opsAPI.js
    • frontend/src/hooks/useChangeRequests.hooks.js
    • frontend/src/hooks/useGetAllAgreements.js
  • Expanded branch/error-path tests and skip/conditional cases.
  • Updated Wave 2 tracking doc with local coverage deltas:
    • docs/developers/frontend/coverage-90/wave-2-issue.md

Issue

How to test

  1. cd frontend
  2. bun run test --watch=false src/api/opsAPI.test.js src/hooks/useChangeRequests.hooks.test.js src/hooks/useGetAllAgreements.test.js
  3. bun run test --watch=false
  4. bun run test:coverage --watch=false
  5. Confirm coverage deltas are reflected in docs/developers/frontend/coverage-90/wave-2-issue.md

A11y impact

  • No accessibility-impacting changes in this PR
  • Accessibility changes included and validated against WCAG 2.1 AA intent
  • Any temporary suppression includes A11Y-SUPPRESSION metadata (owner, expires, rationale)

Screenshots

  • N/A (test-only + docs update)

Definition of Done Checklist

  • OESA: Code refactored for clarity
  • OESA: Dependency rules followed
  • Automated unit tests updated and passed
  • Automated integration tests updated and passed
  • Automated quality tests updated and passed
  • Automated load tests updated and passed
  • Automated a11y tests updated and passed
  • Automated security tests updated and passed
  • 90%+ Code coverage achieved
  • Form validations updated

Links

  • docs/developers/frontend/coverage-90/wave-2-issue.md

@fpigeonjr fpigeonjr self-assigned this Mar 3, 2026
@fpigeonjr fpigeonjr added the a11y label Mar 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.hooks hooks + getChangeRequestsForTooltip helper across dependency/conditional branches.
  • Expanded opsAPI tests around agreement query construction, fiscal year normalization, and getAgreementById query 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.

@fpigeonjr fpigeonjr marked this pull request as ready for review March 3, 2026 18:46
@fpigeonjr fpigeonjr merged commit 0e87a83 into main Mar 4, 2026
55 checks passed
@fpigeonjr fpigeonjr deleted the OPS-codex/wave2-coverage-api-hooks branch March 4, 2026 23:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

🎉 This PR is included in version 1.316.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants