Skip to content

test(connect): add unit test coverage for wallet-address-mismatch warning banner (#419) - #428

Open
PINYOPATTANAWASANPORN wants to merge 1 commit into
MergeFi:mainfrom
PINYOPATTANAWASANPORN:test/connectpanel-address-mismatch-banner-419
Open

PINYOPATTANAWASANPORN wants to merge 1 commit into
MergeFi:mainfrom
PINYOPATTANAWASANPORN:test/connectpanel-address-mismatch-banner-419

Conversation

@PINYOPATTANAWASANPORN

Copy link
Copy Markdown

Summary of Changes

  • Add a dedicated unit test suite for the wallet-address-mismatch warning banner in src/app/connect/ConnectPanel.test.tsx.
  • Test that a warning alert renders with expected banner text when the user's stellarAddress on file differs from the currently connected wallet address.
  • Test that no warning alert renders when the user's on-file address matches the connected wallet address.
  • Test that no warning alert renders when the user has no stellarAddress recorded on file yet.
  • Test that no warning alert renders when no wallet is currently connected.

Root Cause / Technical Context

Verification & Testing

  • Added unit tests in src/app/connect/ConnectPanel.test.tsx:
    • renders a warning alert when user.stellarAddress differs from connected wallet address: asserts Wallet address mismatch and disclaimer text render in the DOM.
    • does not render the warning alert when addresses match: asserts warning banner is absent.
    • does not render the warning alert when user has no stellarAddress on file: asserts warning banner is absent.
    • does not render the warning alert when no wallet is connected: asserts warning banner is absent.

Closes #419

…ning banner (MergeFi#419)

- Verify warning banner renders when user.stellarAddress differs from connected wallet address
- Verify banner does not render when addresses match
- Verify banner does not render when user has no address on file or no wallet connected
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

@PINYOPATTANAWASANPORN is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

ConnectPanel.test.tsx never exercises the #283 wallet-address-mismatch warning banner

1 participant