Skip to content

test: Toast render and auto-dismiss, Tooltip hover/focus visibility, Dashboard controlled and defaultSection navigation #409

Description

@k-deejah

Problem

1. Tests for Toast component render, auto-dismiss, and manual close are missing — after issue e08 adds Toast, no tests verify the toast renders with the correct message, auto-dismisses after the configured duration, or the close button dismisses it immediately.

2. Tests for Tooltip component render and keyboard accessibility are missing — after issue e10 adds Tooltip, no tests verify the tooltip content appears on hover/focus, is hidden by default, or is accessible via keyboard focus on the trigger element.

3. Tests for Dashboard controlled navigation (activeSection/onSectionChange) and defaultSection prop are missing — after issue e12, no tests verify that passing activeSection="transactions" renders TransactionsScreen, onSectionChange fires when a nav item is clicked, or defaultSection="soroban" initialises to the Soroban screen.

Solution

Write Vitest + @testing-library/react tests for all three groups using userEvent.hover, userEvent.tab, and mock props.

Acceptance Criteria

  • Toast render, auto-dismiss, and manual close tests pass
  • Tooltip visibility on hover/focus and hidden-by-default tests pass
  • Dashboard controlled and uncontrolled navigation tests pass
  • All tests pass with npm test

Note for Contributors: Write a clear PR description. Include the full npm test output and describe how you tested the Tooltip keyboard focus behaviour using userEvent.tab().

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programhelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions