From 26d5300008e00f23cabf043247e968941bd79b9c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:47:21 +0000 Subject: [PATCH] test(e2e): align Mobile Chrome specs with phone bottom bar and hidden sidebar Kitchen Setup now lives in the More sheet on phones, and the sidebar is intentionally hidden on phones, so these assertions only apply on larger screens. Fixes the two Mobile Chrome failures on main after #353. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018caQbzEhmf9nMEnNbccatn --- tests/e2e/kitchen-pro.spec.ts | 11 ++++++++++- tests/e2e/pos-till.spec.ts | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/e2e/kitchen-pro.spec.ts b/tests/e2e/kitchen-pro.spec.ts index a3cedf072..12f007f85 100644 --- a/tests/e2e/kitchen-pro.spec.ts +++ b/tests/e2e/kitchen-pro.spec.ts @@ -60,7 +60,16 @@ test("Kitchen Pro is scoped, responsive, and safely setup-only before commercial await page.getByLabel("Password", { exact: true }).fill(f.password); await page.getByRole("button", { name: "Sign in", exact: true }).click(); await expect(page).toHaveURL(/dashboard/); - await expect(page.getByRole("link", { name: "Kitchen Setup" })).toBeVisible(); + // On phones Kitchen lives in the More sheet; on larger screens it is in the sidebar. + const more = page.getByRole("button", { name: "More" }); + if (await more.isVisible()) { + await more.click(); + await expect( + page.getByRole("dialog", { name: "More" }).getByRole("link", { name: "Kitchen Setup" }) + ).toBeVisible(); + } else { + await expect(page.getByRole("link", { name: "Kitchen Setup" })).toBeVisible(); + } await page.goto("/kitchen"); // The modal is deliberately accessible and hides the underlying kitchen // from the accessibility tree. Verify first-run onboarding before page content. diff --git a/tests/e2e/pos-till.spec.ts b/tests/e2e/pos-till.spec.ts index 83d991ed6..f13e3d96d 100644 --- a/tests/e2e/pos-till.spec.ts +++ b/tests/e2e/pos-till.spec.ts @@ -226,7 +226,9 @@ test("Point of Sale creates one canonical accepted staff order with one-tap entr await expect(page.locator(".receipt-paper")).toContainText("Paneer Lunch"); await expect(page.locator(".receipt-details")).toContainText("+919876543210"); await expect(page.locator(".receipt-details dt").filter({ hasText: "Table" })).toHaveCount(0); - await expect(page.locator(".mm-workspace-sidebar")).toBeVisible(); + // Phones hide the sidebar (bottom bar navigation); desktop shows it on screen. + if ((page.viewportSize()?.width ?? 0) > 900) + await expect(page.locator(".mm-workspace-sidebar")).toBeVisible(); await page.emulateMedia({ media: "print" }); await expect(page.locator(".mm-workspace-sidebar")).toBeHidden(); await expect(page.locator(".mm-shared-topbar")).toBeHidden();