Skip to content

test: add dashboard design-system regression coverage #502

@icebear0828

Description

@icebear0828

Context

The dashboard has both light/dark themes and many repeated operational states. As the UI refactor moves styling into shared primitives, tests should prevent regressions in token output, contrast-sensitive selectors, dark-mode rendering, and semantic data display.

Depends on #497 and #498. Should be expanded as #499, #500, and #501 land.

Scope

  • Add token/theme tests that verify key light and dark color values differ where intended and remain present in generated CSS.
  • Add focused component tests for shared primitive variants: primary/secondary/destructive buttons, status badges, progress bars, cards/panels, tabs/chips, inputs/selects.
  • Add page-level regression tests for high-risk semantics: usage history/window values, account status badges/toggles, error unread state, and proxy health states.
  • Add a lightweight contrast check for known foreground/background pairs where practical.

Acceptance criteria

  • Shared primitives have tests covering core variants and disabled/hover/selected state class output or rendered behavior.
  • CSS/theme tests verify important light/dark token output and key selectors.
  • Usage stats tests continue to protect history-window semantics.
  • Tests are deterministic and do not require real external services.
  • No TypeScript any is introduced.

Verification

  • Run npm test.
  • Run npm run build.
  • If frontend styling changes are included, manually verify the dashboard in a browser after build.

Notes

Mock coverage is enough for this visual regression issue because it does not change external SDK/API behavior. Real-service E2E remains required for future changes that touch external services.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions