Add store location map manager #20

Open
nalalangan wants to merge 206 commits from feature/location-map-manager into feature/store-selector-modal
2 changed files with 13 additions and 0 deletions
Showing only changes of commit ada2193085 - Show all commits

View File

@ -146,6 +146,13 @@ export default function LocationMapCanvas({
};
const handleObjectKeyDown = (event, object) => {
if (event.key === "Escape" && (mode === "view" || canEditObjects)) {
event.stopPropagation();
event.preventDefault();
setSelectedObjectKey(null);
return;
}
if (["Enter", " ", "Spacebar"].includes(event.key)) {
event.stopPropagation();
event.preventDefault();

View File

@ -2541,6 +2541,12 @@ test("viewer map areas are keyboard selectable", async ({ page }) => {
await expect(bakeryArea).toHaveAttribute("aria-pressed", "false");
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Frozen Foods");
await expect(page.locator(".location-map-sheet-count")).toHaveText("0 shown");
await page.keyboard.press("Escape");
await expect(frozenArea).toBeFocused();
await expect(frozenArea).toHaveAttribute("aria-pressed", "false");
await expect(page.locator(".location-map-sheet-header strong")).toHaveText("Map Details");
await expect(page.getByLabel("Map summary")).toBeVisible();
});
test("mobile fit zoom fits the map into the visible canvas", async ({ page }) => {