Add store location map manager #20
@ -104,6 +104,7 @@ export default function LocationMapToolbar({
|
||||
<div
|
||||
className={`location-map-history-buttons ${canUseHistoryControls ? "" : "is-inactive"}`}
|
||||
aria-label="Edit history"
|
||||
aria-hidden={!canUseHistoryControls}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@ -184,6 +184,11 @@
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.location-map-history-buttons.is-inactive {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.location-map-history-buttons button {
|
||||
min-width: 40px;
|
||||
padding-inline: 0.55rem;
|
||||
|
||||
@ -1391,15 +1391,15 @@ test("mobile keeps draft preview status compact in the topbar", async ({ page })
|
||||
expect(modeBox.width).toBeLessThanOrEqual(126);
|
||||
expect(reservedHistoryBox.width).toBeGreaterThanOrEqual(82);
|
||||
expect(reservedHistoryBox.x).toBeGreaterThan(modeBox.x + modeBox.width - 1);
|
||||
await expect(historyActions.getByRole("button", { name: "Undo" })).toBeVisible();
|
||||
await expect(historyActions.getByRole("button", { name: "Redo" })).toBeVisible();
|
||||
await expect(historyActions.getByRole("button", { name: "Undo" })).toBeDisabled();
|
||||
await expect(historyActions.getByRole("button", { name: "Redo" })).toBeDisabled();
|
||||
await expect(historyActions).toHaveCSS("visibility", "hidden");
|
||||
await expect(historyActions.locator('button[aria-label="Undo"]')).toBeDisabled();
|
||||
await expect(historyActions.locator('button[aria-label="Redo"]')).toBeDisabled();
|
||||
expect(zoomBox.y).toBeLessThan(modeBox.y + modeBox.height);
|
||||
expect(zoomBox.x).toBeGreaterThan(reservedHistoryBox.x + reservedHistoryBox.width - 1);
|
||||
expect(zoomBox.x + zoomBox.width).toBeLessThanOrEqual(toolbarBox.x + toolbarBox.width + 1);
|
||||
|
||||
await page.getByRole("button", { name: "Edit Draft" }).click();
|
||||
await expect(historyActions).toHaveCSS("visibility", "visible");
|
||||
await expect(historyActions.getByRole("button", { name: "Undo" })).toBeVisible();
|
||||
await expect(historyActions.getByRole("button", { name: "Redo" })).toBeVisible();
|
||||
const editToolbarBox = await toolbar.boundingBox();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user