import { expect, test } from "@playwright/test"; test("loads standalone and keeps the core play workflow local", async ({ page, }) => { const runtimeErrors: string[] = []; page.on("pageerror", (error) => runtimeErrors.push(error.message)); page.on("console", (message) => { if (message.type() === "error") runtimeErrors.push(message.text()); }); await page.goto("/deep/nested/sudoku/"); await expect( page.getByRole("heading", { name: "A first classic" }), ).toBeVisible(); const grid = page.getByRole("grid", { name: "9 by 9 Sudoku grid" }); await expect(grid).toBeVisible(); await expect(grid.getByRole("gridcell")).toHaveCount(81); await grid.getByRole("gridcell", { name: "Row 1, column 3, empty" }).click(); await page .getByRole("group", { name: "Digits" }) .getByRole("button", { name: "2", exact: true }) .click(); await expect( grid.getByRole("gridcell", { name: "Row 1, column 3, 2" }), ).toBeVisible(); await page.getByRole("button", { name: "Undo" }).click(); await expect( grid.getByRole("gridcell", { name: "Row 1, column 3, empty" }), ).toBeVisible(); await page.getByRole("button", { name: "Helpers" }).click(); await expect( page.getByRole("heading", { name: "Sudoku helpers" }), ).toBeVisible(); await expect( page.getByRole("tab", { name: "Killer combinations" }), ).toHaveAttribute("aria-selected", "true"); await expect(page.locator(".helper-result")).toContainText("4 combinations"); await page.getByRole("button", { name: "Import / export" }).click(); await expect( page.getByRole("heading", { name: "Import and export" }), ).toBeVisible(); await expect( page.getByText(/Server-only short IDs are never fetched\./u), ).toBeVisible(); await expect( page.getByText(/Share links are self-contained\./u), ).toBeVisible(); expect(runtimeErrors).toEqual([]); });