Skip to content

Add Admin Money Page Component Tests - #2063

Merged
yusuftomilola merged 11 commits into
DistinctCodes:mainfrom
ObedChibunna:Admin-pages-have-almost-no-tests-(only-integrity-and-RequireAdmin-are-covered)-#1989
Oct 20, 2026
Merged

yusuftomilola merged 11 commits into
DistinctCodes:mainfrom
ObedChibunna:Admin-pages-have-almost-no-tests-(only-integrity-and-RequireAdmin-are-covered)-#1989

Conversation

@ObedChibunna

@ObedChibunna ObedChibunna commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add Vitest and Testing Library coverage for admin account, charge, refund, split, and settlement pages, including success and failure states, validation, confirmation, and money movement actions. Ensure app/admin coverage exceeds 60%.

Adds component tests for admin accounts, charge, credits, payments, refunds, splits, and settlements. Covers key success and failure paths, including charge confirmation, refund validation, split totals, and settlement actions. Adds missing loading and error states where needed. These checks help catch regressions in admin workflows that move money.

Contracts checklist

If this PR touches anything under contracts/, confirm it against the
pre-deployment security checklist before
requesting review:

  • make audit (CT-72 require_auth() coverage) passes.
  • Every amount-handling path uses checked arithmetic (CT-73) — no raw
    +/- on amounts.
  • Not applicable — this PR does not touch contracts/.

Test plan

npm run test:cov — 159 tests passed; admin statement coverage: 79.41%.
npm run lint — passed with existing warnings.
npm run typecheck — passed.
NEXT_PUBLIC_API_URL=http://localhost:6000 npm run build — passed.
CI=true npm run test:e2e — 2 tests passed.
git diff --check — passed.

npm run test:cov — 159 tests passed; admin statement coverage: 79.41%.
npm run lint — passed with warnings.
npm run typecheck — passed.
npm run build — passed.
npm run test:e2e — 2 tests passed.
git diff --check — passed.

CLOSES #1989

Add Vitest and Testing Library coverage for admin account, charge, refund, split, and settlement pages, including success and failure states, validation, confirmation, and money movement actions. Ensure app/admin coverage exceeds 60%.

CLOSES DistinctCodes#1989
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@ObedChibunna Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@ObedChibunna is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola
yusuftomilola merged commit b9e0f8a into DistinctCodes:main Oct 20, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin pages have almost no tests (only integrity and RequireAdmin are covered)

2 participants