# frontend/src/widgets/__tests__
dir: frontend/src/widgets/__tests__

index: frontend/src/widgets/__tests__/.pi-map.index.md

## role
Test suite providing comprehensive unit tests for dashboard widget components, verifying rendering across loading, data, empty, and error states.
## files
- JellyfinNowPlayingWidget.test.tsx | Tests the JellyfinNowPlayingWidget component by verifying it correctly renders active sessions, empty state, and error conditions. | dep: vitest, @testing-library/react, ../JellyfinNowPlayingWidget, ../../types, JellyfinNowPlayingWidget, useWidgets hook
- PrometheusChartWidget.test.tsx | Tests the PrometheusChartWidget component by verifying its rendering states including loading skeleton, chart with series data, error alerts, and empty states. | dep: vitest, @testing-library/react, ../PrometheusChartWidget, ../../types, ../../hooks/useWidgets, PrometheusChartWidget, useWidgets hook, WidgetInstance type
- PrometheusGaugeWidget.test.tsx | Tests the PrometheusGaugeWidget component, covering loading, data with/without threshold bands, error, and empty states. | dep: vitest, @testing-library/react, ../PrometheusGaugeWidget, ../../types, ../../hooks/useWidgets, PrometheusGaugeWidget, WidgetInstance types, useWidgets hook
- PrometheusMeanWidget.test.tsx | Tests the PrometheusMeanWidget component covering loading, data display, error, and empty states. | dep: vitest, @testing-library/react, ../PrometheusMeanWidget, ../../types, ../../hooks/useWidgets, PrometheusMeanWidget, useWidgets, types
- QbittorrentActiveTorrentsWidget.test.tsx | Tests the QbittorrentActiveTorrentsWidget component for loading, data rendering, empty state, and error handling scenarios. | dep: vitest, @testing-library/react, ../QbittorrentActiveTorrentsWidget, ../../types, ../../hooks/useWidgets, QbittorrentActiveTorrentsWidget, WidgetInstance, useWidgets
- QbittorrentSpeedWidget.test.tsx | Tests the QbittorrentSpeedWidget component for loading, data rendering, empty state, and error handling scenarios. | dep: vitest, @testing-library/react, ../QbittorrentSpeedWidget, ../../types, ../../hooks/useWidgets, QbittorrentSpeedWidget, useWidgets
- QbittorrentTotalsWidget.test.tsx | Tests the QbittorrentTotalsWidget component for loading, data rendering, and error states. | dep: vitest, @testing-library/react, ../QbittorrentTotalsWidget, ../../types, ../../hooks/useWidgets, QbittorrentTotalsWidget, useWidgets, types
## arch
Co-located React component testing using a consistent arrange-act-assert pattern, with each widget receiving isolated test coverage of its visual and data-handling states.
## tags
widget.test, usewidgets, types, tests, component, error, vitest, @testing
## symbols
-
## workflows
- update __tests__ tests
  read: JellyfinNowPlayingWidget.test.tsx, PrometheusChartWidget.test.tsx, PrometheusGaugeWidget.test.tsx
## dirty
-
