Problem
src/components/map/my-places-panel.tsx (245 lines — the signed-in-only "My places" panel: search/filter over a user's saved places, select-to-locate, and CRUD entry points per the closed #145) has no test file:
$ find src -name "*.test.tsx" | grep -i places
src/lib/places.test.ts
src/lib/places-api.test.ts
src/lib/user-places.test.ts
src/lib/user-places.ts (the data layer) is tested, but the panel component that renders and filters that data isn't. It owns non-trivial logic in its own right — filtering saved places by search text and city, the empty-state branching ("No saved places match this search" vs. the zero-saved-places case), and the onSelectPlace click-to-locate wiring — none of which is covered anywhere.
Comparable CRUD-adjacent components elsewhere in the app do have tests (competitions-browser.test.tsx for its filter/search logic, save-button.test.tsx, country-track-list.test.tsx), making this panel a clear outlier among "signed-in feature" components.
Fix
Add src/components/map/my-places-panel.test.tsx using the existing Testing Library conventions (see results-list.test.tsx for a comparable map-adjacent component), covering at minimum: the search/city filtering logic, the two distinct empty states, and that clicking a row calls onSelectPlace with the right place.
Acceptance criteria
Problem
src/components/map/my-places-panel.tsx(245 lines — the signed-in-only "My places" panel: search/filter over a user's saved places, select-to-locate, and CRUD entry points per the closed #145) has no test file:src/lib/user-places.ts(the data layer) is tested, but the panel component that renders and filters that data isn't. It owns non-trivial logic in its own right — filtering saved places by search text and city, the empty-state branching ("No saved places match this search" vs. the zero-saved-places case), and theonSelectPlaceclick-to-locate wiring — none of which is covered anywhere.Comparable CRUD-adjacent components elsewhere in the app do have tests (
competitions-browser.test.tsxfor its filter/search logic,save-button.test.tsx,country-track-list.test.tsx), making this panel a clear outlier among "signed-in feature" components.Fix
Add
src/components/map/my-places-panel.test.tsxusing the existing Testing Library conventions (seeresults-list.test.tsxfor a comparable map-adjacent component), covering at minimum: the search/city filtering logic, the two distinct empty states, and that clicking a row callsonSelectPlacewith the right place.Acceptance criteria
src/components/map/my-places-panel.test.tsxexists and passes undernpm run test:unit