Skip to content

test: add Soroban coverage gaps and fix missing deps/config#225

Open
devOgazi wants to merge 2 commits into
Sorokit:mainfrom
devOgazi:test/soroban-coverage-gaps
Open

test: add Soroban coverage gaps and fix missing deps/config#225
devOgazi wants to merge 2 commits into
Sorokit:mainfrom
devOgazi:test/soroban-coverage-gaps

Conversation

@devOgazi

Copy link
Copy Markdown

Problem

Three test coverage gaps left SorobanPanel state management, SorobanInvokeButton disabled state, and the SorobanScreen contract ID lift untested.

Solution

  • SorobanPanel: full implementation with useEffect that clears result on contractId change. New test verifies stale result is cleared.
  • SorobanInvokeButton: added autoResetAfter prop with useEffect timer. Test uses vi.useFakeTimers({ shouldAdvanceTime: true }) so waitFor polls in real-time while vi.advanceTimersByTime(1000) fires the auto-reset.
  • SorobanScreen: 5 tests (most already written) now pass after SorobanPanel became functional and ContractEventFeed renders a heading for assertions.
  • Config: restored missing vitest.config.ts and src/test-setup.ts.
  • Deps: fixed @creit.tech/stellar-wallets-kit version, added @radix-ui/react-slot and missing test deps.

Test output

✓ src/screens/SorobanScreen.test.tsx (5 tests)
✓ src/components/SorobanPanel.test.tsx (8 tests)
✓ src/components/SorobanInvokeButton.test.tsx (11 tests)
Test Files 3 passed (3)
Tests 24 passed (24)

Closes #171

- Implement SorobanPanel with contractId-change result clear (issue Sorokit#53)
- Add autoResetAfter prop to SorobanInvokeButton with timer logic
- Add ContractEventFeed minimal rendering for test assertions
- Write SorobanPanel test: contractId change after success clears result
- Write SorobanInvokeButton test: autoResetAfter timer resets to idle
- SorobanScreen contractId gate tests (already existed, now passing)
- Add vitest.config.ts and test-setup.ts (missing on main)
- Fix @creit.tech/stellar-wallets-kit version (0.0.0-beta.0 -> ^2.5.0)
- Install @radix-ui/react-slot and missing test deps
@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@devOgazi 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: SorobanPanel stale result clear, SorobanInvokeButton autoResetAfter timer, SorobanScreen contractId gate

1 participant