Skip to content

test: SorokitProvider isLoading false after all operations complete, TransactionHistory feePaid formatting, QRCode figcaption label #216

Description

@k-deejah

Problem

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

1. SorobanPanel result-clear-on-contractId-change is untested

After the fix in issue #53 (result clears when contractId changes), no test verifies this behaviour. A regression would silently re-introduce the stale result flash.

2. SorobanInvokeButton autoResetAfter prop is untested

After issue #53 adds autoResetAfter, no test uses vi.useFakeTimers() to verify the component resets to "idle" after the specified delay following a successful invocation.

3. SorobanScreen contractId state lift to ContractEventFeed is untested

After SorobanScreen lifts contractId state, no test verifies ContractEventFeed renders when contractId is non-empty and is hidden when empty.

Solution

Write Vitest tests:

  1. SorobanPanel: change contractId after success → result clears.
  2. SorobanInvokeButton: autoResetAfter={1000} → after 1s fake timer advance, state is "idle".
  3. SorobanScreen: contractId empty → ContractEventFeed not rendered; non-empty → rendered.

Acceptance Criteria

  • SorobanPanel contractId-change result clear test passes
  • SorobanInvokeButton autoResetAfter timer test passes using vi.useFakeTimers()
  • SorobanScreen contractId gate tests pass
  • All tests pass with npm test

Note for Contributors: Write a clear PR description. Include the full npm test output and explain the fake timer setup.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions