Skip to content

Conversation

@vishnuravi
Copy link
Collaborator

Added test suites for main components:

  • BarChartCard: Tests for rendering, view toggling, filtering, click events, and metric changes
  • ModelInfoDrawer: Tests for search inputs, suggestions, selection handling, and model rendering
  • PageHeader: Tests for title, descriptions, and external links
  • Footer: Tests for GitHub link and icon
  • FiltersPanel: Tests for team groups, conditions, and toggles

Also added window.matchMedia mock to vitest.setup.ts to support components using media queries.

All 43 tests pass successfully across 7 test files.

Added test suites for main components:
- BarChartCard: Tests for rendering, view toggling, filtering, click events, and metric changes
- ModelInfoDrawer: Tests for search inputs, suggestions, selection handling, and model rendering
- PageHeader: Tests for title, descriptions, and external links
- Footer: Tests for GitHub link and icon
- FiltersPanel: Tests for team groups, conditions, and toggles

Also added window.matchMedia mock to vitest.setup.ts to support components using media queries.

All 43 tests pass successfully across 7 test files.
Updated tests to be more maintainable by:
- Using dynamic values from test fixtures instead of hardcoded strings
- Using DOM queries by role and structure instead of specific text
- Making assertions based on relationships rather than specific values

This makes tests more resilient to changes in model names, labels, and other data values that may evolve over time.
@vishnuravi vishnuravi merged commit 44dc3cd into main Dec 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants