diff --git a/tests/e2e/kitchen-pro.spec.ts b/tests/e2e/kitchen-pro.spec.ts index a3cedf07..12f007f8 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 83d991ed..f13e3d96 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();