Skip to content

test: NetworkSwitcher/ButtonGroup/SorobanInvokeButton coverage (issue #346) - #432

Open
BernardOnuh wants to merge 1 commit into
Sorokit:mainfrom
BernardOnuh:feat/issue-346-network-click-soroban-invoke-tests
Open

test: NetworkSwitcher/ButtonGroup/SorobanInvokeButton coverage (issue #346)#432
BernardOnuh wants to merge 1 commit into
Sorokit:mainfrom
BernardOnuh:feat/issue-346-network-click-soroban-invoke-tests

Conversation

@BernardOnuh

@BernardOnuh BernardOnuh commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the missing test coverage requested in #346. Most scenarios named in this issue (Alt+N shortcut, mismatch badge, NetworkSwitcher localStorage persistence, ButtonGroup icons and href-disabled behavior) were already covered by existing tests, so this PR targets the genuine gaps only.

Changes

  • SorobanInvokeButton (SorobanInvokeButton.test.tsx)
    • Loading label shows 'Invoking {method}...' while an invocation is in flight, and 'Invoking...' when a custom label is provided.
    • tooltip prop renders as the button title when connected; falls back to 'Connect wallet to invoke' when disconnected.
    • Result container caps its height via maxResultHeight (default 200px and custom values).
  • ButtonGroup (Button.test.tsx)
    • Hardened the border-radius tests to assert the [&>:not(:first-child)]:rounded--none child selectors that collapse the shared radius on sibling buttons.

Test output

``'
✓ src/components/ui/Button.test.tsx (30 tests)
✓ src/components/SorobanInvokeButton.test.tsx (16 tests)

Test Files 2 passed (2)
Tests 46 passed (46)
``'

Note: a full npm test reports pre-existing failures in unrelated files (NFTGallery, ActivityTimeline, RewardsPanel, PortfolioRebalancer, etc.) caused by a @hugeicons/react incompatibility. These fail identically on the base commit and are out of scope for this issue.

Closes #346

- Assert the loading label shows "Invoking {method}…" while an
  invocation is in flight, and the generic "Invoking…" when a custom
  label is provided
- Verify the tooltip prop renders as the button's title when connected
  and falls back to the connect hint title when disconnected
- Verify the result container caps its height via maxResultHeight
  (default 200px and custom values)
- Harden ButtonGroup border-radius tests to assert the child selector
  classes that collapse the shared radius on sibling buttons
@drips-wave

drips-wave Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

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.

test: NetworkSwitcher localStorage and Alt+N, ButtonGroup styling and href disabled, SorobanInvokeButton loading label and result height

1 participant