Skip to content

Add frontend component tests #75

Description

@akonopcz

Overview

Extend frontend test coverage by adding component tests using React Testing Library.

Current state: 6% coverage (utility tests only)
Target: 30%+ coverage

Components to Test

High Priority

  • SoundButton.tsx - Rendering, click handler, loading states (~5 tests)
  • CategoryTabs.tsx - Tab switching, active state, rendering (~5 tests)
  • DashboardHeader.tsx - Rendering, props (~3 tests)

Medium Priority

  • Settings.tsx - Tab navigation (~3 tests)
  • AudioDeviceSettings.tsx - Device selection, volume controls (~5 tests)
  • PlaybackSettings.tsx - Toggle states (~3 tests)

Technical Requirements

  • Mock Context Providers (AudioContext, SettingsContext, SoundLibraryContext)
  • Extended Tauri API mocks
  • React Testing Library patterns

Related

Acceptance Criteria

  • Component tests for high priority components
  • Frontend coverage >= 30%
  • All tests passing in CI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

developer-toolsDeveloper experience, tooling, debuggingenhancementNew feature or request

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions