diff --git a/frontend/src/components/maps/LocationMapSetupPanel.jsx b/frontend/src/components/maps/LocationMapSetupPanel.jsx index 1f06f13..17d294c 100644 --- a/frontend/src/components/maps/LocationMapSetupPanel.jsx +++ b/frontend/src/components/maps/LocationMapSetupPanel.jsx @@ -15,10 +15,11 @@ export default function LocationMapSetupPanel({ const createBlankLabel = savingAction === "create-blank" ? "Creating..." : "Create Blank Map"; const createZonesButtonLabel = savingAction === "create-zones" ? "Creating..." : createFromZonesLabel; const publishLabel = savingAction === "publish" ? "Publishing..." : "Publish"; + const heading = hasAnyMap ? "Draft Map" : canManage ? "No Map" : "No Published Map"; return (
-

{hasAnyMap ? "Draft Map" : "No Map"}

+

{heading}

{canManage ? (
diff --git a/frontend/tests/location-map-manager.spec.ts b/frontend/tests/location-map-manager.spec.ts index 60dab4c..88c5edb 100644 --- a/frontend/tests/location-map-manager.spec.ts +++ b/frontend/tests/location-map-manager.spec.ts @@ -4283,7 +4283,8 @@ test("members see a clean empty state when no map is published", async ({ page } await page.goto("/stores/100/locations/10/map"); - await expect(page.getByRole("heading", { name: "No Map" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "No Published Map" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "No Map" })).toHaveCount(0); await expect(page.getByRole("group", { name: "Map setup details" })).toHaveCount(0); await expect(page.getByText("Not published")).toHaveCount(0); await expect(page.getByText("A household admin has not published a map yet.")).toHaveCount(0); @@ -4325,7 +4326,8 @@ test("members do not see unpublished draft maps", async ({ page }) => { await page.goto("/stores/100/locations/10/map"); - await expect(page.getByRole("heading", { name: "No Map" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "No Published Map" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "No Map" })).toHaveCount(0); await expect(page.getByRole("group", { name: "Map setup details" })).toHaveCount(0); await expect(page.getByText("Not published")).toHaveCount(0); await expect(page.getByText("A household admin has not published a map yet.")).toHaveCount(0);