diff --git a/frontend/tests/location-map-manager.spec.ts b/frontend/tests/location-map-manager.spec.ts index 5dff13f..1d03453 100644 --- a/frontend/tests/location-map-manager.spec.ts +++ b/frontend/tests/location-map-manager.spec.ts @@ -305,6 +305,16 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({ expect(Number(savedBreadWall?.height)).toBeGreaterThan(180); expect(savedObjects.some((object) => object.label === "Temporary Freezer")).toBe(false); + await page.goto("/login"); + await expect(page.getByRole("heading", { name: "Login" })).toBeVisible(); + + await page.goto("/stores/100/locations/10/map"); + await expect(page.locator(".location-map-status")).toHaveText("Draft"); + await expect(page.getByRole("heading", { name: "Draft Map" })).toBeVisible(); + await page.getByRole("button", { name: "Continue Editing" }).click(); + await expect(page.locator(".location-map-object", { hasText: "Bread Wall" })).toBeVisible(); + await expect(page.locator(".location-map-object", { hasText: "Temporary Freezer" })).toHaveCount(0); + await page.getByRole("button", { name: "Publish" }).click(); await expect(page.locator(".location-map-status")).toHaveText("Published"); await expect(page.getByRole("button", { name: "Edit Map" })).toBeVisible();