Skip to content

test: AccountScreen refresh loading state and timestamp, ConnectScreen wallet options and collapsible section, Sidebar localStorage #199

Description

@k-deejah

Problem

Three test gaps leave AccountScreen refresh states, ConnectScreen responsive behaviour, and Sidebar nav persistence untested after their respective fix PRs.

1. AccountScreen refresh button loading and last-refreshed timestamp are untested

After issue #81, no test verifies: the Refresh button is disabled while isLoadingAccount is true, the "Last updated" timestamp appears after refreshAccount resolves, or the Friendbot link renders on testnet with zero balances.

2. ConnectScreen wallet options and "New to Stellar?" section are untested

After issue #82, no test verifies: wallet logos render on the connect screen, the "New to Stellar?" <details> element is in the DOM and can be expanded, and the hero section has the responsive hide class.

3. Sidebar localStorage read-on-mount and write-on-navigate are untested

After issue #72, no test verifies: mounting Sidebar with a stored value in localStorage pre-selects that section, navigating calls localStorage.setItem with the new section, and a missing key defaults to "wallet".

Solution

Write Vitest tests for all three using vi.stubGlobal("localStorage", ...) for the storage tests.

Acceptance Criteria

  • AccountScreen refresh state tests pass
  • ConnectScreen wallet options and collapsible section tests pass
  • Sidebar localStorage persistence 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

No one assigned

    Labels

    help 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