Skip to content

test(ngo-admin): cover page states - #286

Merged
github-actions[bot] merged 1 commit into
StreamGive:mainfrom
Favourof:test/ngo-admin-states
Oct 18, 2026
Merged

github-actions[bot] merged 1 commit into
StreamGive:mainfrom
Favourof:test/ngo-admin-states

Conversation

@Favourof

Copy link
Copy Markdown
Contributor

Description

Resolves #240.

The /ngo-admin page handles four distinct wallet and registration states (wallet disconnected, no NGO registered, registered but unverified, and verified), none of which were covered by unit tests.

This PR adds comprehensive test coverage across all four states.

Changes

  • Added state-driven test suite in src/app/ngo-admin/page.test.tsx using mocked lookupNgoByAddress:
    1. Wallet not connected: Asserts the prompt to connect wallet is displayed.
    2. No NGO registered: Mocked lookupNgoByAddress returning null, asserts un-registered view and registration CTA.
    3. Registered but unverified: Mocked lookupNgoByAddress with verified: false, asserts the pending verification banner.
    4. Verified: Mocked lookupNgoByAddress with verified: true, asserts statistics totals (Total withdrawn, Remaining balance, Active streams) and renders the stream list.

How to Test

  1. Run npx vitest run src/app/ngo-admin/page.test.tsx.

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Favourof is attempting to deploy a commit to the Ashborne team Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Favourof 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

@github-actions
github-actions Bot merged commit 4bac0ef into StreamGive:main Oct 18, 2026
1 of 3 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.

Add tests for the NGO admin page states

1 participant