fix: declutter map setup state
This commit is contained in:
parent
023aef10ec
commit
d370e23529
@ -434,19 +434,21 @@ export default function LocationMapManager() {
|
|||||||
<LocationMapTopbar location={location} status={status} onBack={handleBack} />
|
<LocationMapTopbar location={location} status={status} onBack={handleBack} />
|
||||||
|
|
||||||
<main className="location-map-workspace">
|
<main className="location-map-workspace">
|
||||||
<LocationMapToolbar
|
{hasAnyMap && mode !== "setup" ? (
|
||||||
mode={mode}
|
<LocationMapToolbar
|
||||||
editorTool={editorTool}
|
mode={mode}
|
||||||
hasAnyMap={hasAnyMap}
|
editorTool={editorTool}
|
||||||
canManage={canManage}
|
hasAnyMap={hasAnyMap}
|
||||||
zoom={zoom}
|
canManage={canManage}
|
||||||
setZoom={setZoom}
|
zoom={zoom}
|
||||||
onFit={handleFitMap}
|
setZoom={setZoom}
|
||||||
onView={handleViewMode}
|
onFit={handleFitMap}
|
||||||
onEdit={handleEditMode}
|
onView={handleViewMode}
|
||||||
onPanMode={() => setEditorTool("pan")}
|
onEdit={handleEditMode}
|
||||||
onEditObjects={() => setEditorTool("edit")}
|
onPanMode={() => setEditorTool("pan")}
|
||||||
/>
|
onEditObjects={() => setEditorTool("edit")}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
|
||||||
{!hasAnyMap || (mode === "setup" && mapState?.draft_map && !mapState?.published_map) ? (
|
{!hasAnyMap || (mode === "setup" && mapState?.draft_map && !mapState?.published_map) ? (
|
||||||
<LocationMapSetupPanel
|
<LocationMapSetupPanel
|
||||||
|
|||||||
@ -263,6 +263,7 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
|
|||||||
await expect(page.getByText("Eastvale")).toBeVisible();
|
await expect(page.getByText("Eastvale")).toBeVisible();
|
||||||
await expect(page.getByRole("heading", { name: "No Map" })).toBeVisible();
|
await expect(page.getByRole("heading", { name: "No Map" })).toBeVisible();
|
||||||
await expect(page.getByRole("button", { name: "Create Map From Existing Zones" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Create Map From Existing Zones" })).toBeVisible();
|
||||||
|
await expect(page.getByLabel("Map controls")).toHaveCount(0);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Create Map From Existing Zones" }).click();
|
await page.getByRole("button", { name: "Create Map From Existing Zones" }).click();
|
||||||
await expect(page.getByText("Bakery")).toBeVisible();
|
await expect(page.getByText("Bakery")).toBeVisible();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user