Skip to content

test: Sidebar localStorage nav persistence, TopBar h1 heading semantic, SorokitProvider isLoading aggregation #190

Description

@k-deejah

Problem

Three test coverage gaps leave Sidebar localStorage persistence, TopBar heading semantics, and SorokitProvider isLoading aggregation untested.

1. Sidebar localStorage nav state persistence is untested

After issue #72, no test verifies: localStorage.getItem("sorokit-active-nav") is read on mount, the saved section is pre-selected, and navigating to a new section updates localStorage.

2. TopBar <h1> semantic heading is untested

After issue #73, no test verifies: the page title renders as an <h1> element, the <h1> text matches the active nav label, and only one <h1> exists in the rendered output.

3. SorokitProvider isLoading aggregation is untested

After issue #79 adds isLoading, no test verifies: isLoading is true when isConnecting is true, true when isLoadingAccount is true, and false when both are false.

Solution

Write Vitest tests covering all three:

  1. Sidebar: localStorage read on mount, section pre-selected, navigation updates localStorage.
  2. TopBar: title is <h1>, text matches label, only one <h1>.
  3. SorokitProvider: isLoading correctly aggregates connecting and account loading states.

Acceptance Criteria

  • Sidebar localStorage tests pass
  • TopBar <h1> tests pass
  • SorokitProvider isLoading tests pass
  • All tests pass with npm test

Note for Contributors: Write a clear PR description. Include the full npm test output.

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