fix: clarify map edit tool labels
This commit is contained in:
parent
7f73a3aed3
commit
8808dad38e
@ -60,8 +60,8 @@ export default function LocationMapBottomSheet({
|
||||
? selectedObject && editorTool === "edit"
|
||||
? selectedTitle
|
||||
: editorTool === "edit"
|
||||
? "Edit Objects"
|
||||
: "Pan Mode"
|
||||
? "Edit Areas"
|
||||
: "Move Map"
|
||||
: selectedObject
|
||||
? selectedTitle
|
||||
: "Map Details";
|
||||
|
||||
@ -85,7 +85,7 @@ export default function LocationMapToolbar({
|
||||
disabled={saving}
|
||||
aria-pressed={editorTool === "pan"}
|
||||
>
|
||||
Pan Mode
|
||||
Move Map
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@ -94,7 +94,7 @@ export default function LocationMapToolbar({
|
||||
disabled={saving}
|
||||
aria-pressed={editorTool === "edit"}
|
||||
>
|
||||
Edit Objects
|
||||
Edit Areas
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@ -268,11 +268,11 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
|
||||
await page.getByRole("button", { name: "Create From 2 Zones" }).click();
|
||||
await expect(page.getByText("Bakery")).toBeVisible();
|
||||
await expect(page.getByText("Frozen Foods")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Pan Mode" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Edit Objects" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Move Map" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Edit Areas" })).toBeVisible();
|
||||
await expect(page.locator(".location-map-pin")).toHaveCount(0);
|
||||
|
||||
await page.getByRole("button", { name: "Pan Mode" }).click();
|
||||
await page.getByRole("button", { name: "Move Map" }).click();
|
||||
const bakeryPanObject = page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first();
|
||||
const panBox = await bakeryPanObject.boundingBox();
|
||||
expect(panBox).not.toBeNull();
|
||||
@ -284,7 +284,7 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
|
||||
});
|
||||
await page.mouse.up();
|
||||
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
const bakeryObject = page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first();
|
||||
await bakeryObject.click();
|
||||
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Bakery");
|
||||
@ -335,7 +335,7 @@ test("admin creates a map from zones, saves a draft, and publishes it", async ({
|
||||
await expect(page.locator(".location-map-status")).toHaveText("Unsaved Draft");
|
||||
|
||||
await page.getByRole("button", { name: "Edit Draft" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Bread Wall" }).locator("rect").first().click();
|
||||
await page.getByRole("button", { name: "Save Draft" }).click();
|
||||
await expect(page.locator(".location-map-status")).toHaveText("Draft");
|
||||
@ -646,7 +646,7 @@ test("admin selecting an object does not mark a draft dirty until it changes", a
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
const bakeryObject = page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first();
|
||||
await bakeryObject.click();
|
||||
|
||||
@ -720,14 +720,14 @@ test("admin can recover hidden map areas from the empty canvas", async ({ page }
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.getByRole("button", { name: "Map area Bakery" }).click();
|
||||
await expect(page.getByLabel("Visible")).toBeChecked();
|
||||
await expect(page.getByLabel("Locked")).not.toBeChecked();
|
||||
|
||||
await page.getByLabel("Visible").click();
|
||||
await expect(page.getByRole("button", { name: "Map area Bakery" })).toHaveCount(0);
|
||||
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Edit Objects");
|
||||
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Edit Areas");
|
||||
await expect(page.getByText("No visible map areas")).toBeVisible();
|
||||
await expect(page.locator(".location-map-empty-canvas").getByRole("button", { name: "Show Hidden" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Show Hidden Areas (1)" })).toBeVisible();
|
||||
@ -779,7 +779,7 @@ test("admin locked map areas hide resize affordances", async ({ page }) => {
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
const bakeryArea = page.getByRole("button", { name: "Map area Bakery" });
|
||||
await bakeryArea.click();
|
||||
|
||||
@ -858,7 +858,7 @@ test("admin cleared map area labels keep linked zone action names", async ({ pag
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.getByRole("button", { name: "Map area Bakery" }).click();
|
||||
await page.getByRole("textbox", { name: "Label" }).fill("");
|
||||
|
||||
@ -918,7 +918,7 @@ test("admin nudges selected map areas with arrow keys", async ({ page }) => {
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
const bakeryArea = page.getByRole("button", { name: "Map area Bakery" });
|
||||
await bakeryArea.focus();
|
||||
await expect(bakeryArea).toBeFocused();
|
||||
@ -974,7 +974,7 @@ test("admin selected map area uses compact editable fields", async ({ page }) =>
|
||||
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first().click();
|
||||
|
||||
await expect(page.locator(".location-map-field-row")).toHaveCount(2);
|
||||
@ -1040,7 +1040,7 @@ test("admin save progress locks draft controls", async ({ page }) => {
|
||||
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first().click();
|
||||
await page.getByRole("textbox", { name: "Label" }).fill("Saving Bakery");
|
||||
|
||||
@ -1113,7 +1113,7 @@ test("admin save progress locks empty-canvas recovery actions", async ({ page })
|
||||
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first().click();
|
||||
await page.getByLabel("Visible").click();
|
||||
|
||||
@ -1183,7 +1183,7 @@ test("admin hard navigation warns when draft edits are unsaved", async ({ page }
|
||||
});
|
||||
|
||||
await page.getByRole("button", { name: "Continue Editing" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Bakery" }).locator("rect").first().click();
|
||||
await page.getByRole("textbox", { name: "Label" }).fill("Hard Navigation Bakery");
|
||||
|
||||
@ -1262,7 +1262,7 @@ test("admin publish saves pending map edits before publishing", async ({ page })
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Edit Draft" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Live Bakery" }).locator("rect").first().click();
|
||||
await page.getByRole("textbox", { name: "Label" }).fill("Quick Publish Bakery");
|
||||
await expect(page.locator(".location-map-status")).toHaveText("Unsaved Draft");
|
||||
@ -1344,7 +1344,7 @@ test("admin publish failure keeps successfully saved pending edits", async ({ pa
|
||||
await page.goto("/stores/100/locations/10/map");
|
||||
|
||||
await page.getByRole("button", { name: "Edit Draft" }).click();
|
||||
await page.getByRole("button", { name: "Edit Objects" }).click();
|
||||
await page.getByRole("button", { name: "Edit Areas" }).click();
|
||||
await page.locator(".location-map-object", { hasText: "Live Bakery" }).locator("rect").first().click();
|
||||
await page.getByRole("textbox", { name: "Label" }).fill("Saved Draft Bakery");
|
||||
await expect(page.locator(".location-map-status")).toHaveText("Unsaved Draft");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user