// Regression coverage for issue #1485 — the "Add place" button vanished once a // collection held its first mappable place on a wide/desktop layout. The button // now lives inside the filter row (delegated via `canAddPlace`) for a populated // list, and as an empty-state CTA when the list has no places yet. These tests // render the page against a mocked useCollections hook (per the Page pattern) and // assert the Add affordance stays reachable — and that there is exactly one of it. import { describe, it, expect, vi } from 'vitest' import React from 'react' import { render, screen } from '../../tests/helpers/render' import CollectionsPage from './CollectionsPage' // Stub every child so the test isolates CollectionsPage's own toolbar/branch JSX // (the Add button is rendered by the page itself, not by any child). This also // keeps the Leaflet/Mapbox map out of jsdom. vi.mock('../components/Layout/Navbar', () => ({ default: () =>