Skip to content

test: cover StreamDetail access for non-party wallets (Closes #1281) - #1372

Open
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:test/stream-detail-foreign-wallet-access
Open

test: cover StreamDetail access for non-party wallets (Closes #1281)#1372
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:test/stream-detail-foreign-wallet-access

Conversation

@waterWang

Copy link
Copy Markdown

Description

Adds unit tests for StreamDetail.tsx's behavior when navigating to a stream that the connected wallet is not a party to.

Closes #1281

Test Coverage

Test Case Assertion
API returns null for foreign stream "Stream not found" renders
Recipient differs from wallet No stream details leaked
Treasury differs from wallet "Back to streams" link present
Wallet IS a party Full stream details render
Non-existent stream ID "Stream not found" with ID shown

Execution

# Run all wallet-access tests
npx vitest run src/pages/__tests__/StreamDetail.walletAccess.test.tsx

# Run all StreamDetail tests (pre-existing suite)
npx vitest run src/pages/__tests__/StreamDetail

Testing

  • ✅ 5 new tests all pass
  • ✅ All existing StreamDetail tests still pass (18/18)
  • ✅ Pre-existing edgeCases test failures unrelated to this change
  • ✅ TypeScript compiles without new errors

…-Org#1281)

Add unit tests for StreamDetail's behavior when navigating to a stream
the connected wallet is not a party to. Tests assert the not-found
state renders instead of leaking stream details.

Covers:
- API returns null for foreign stream → not-found state
- Recipient differs from wallet → not-found state
- Treasury differs from wallet → not-found state
- Wallet IS a party → stream details render normally
- Non-existent stream ID → not-found state
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 unit tests for src/pages/StreamDetail.tsx's behavior when navigating to a valid :streamId that belongs to a different, non-connected wallet

1 participant