diff --git a/e2e/auth.test.ts b/e2e/auth.test.ts index 0542307..8cda6a3 100644 --- a/e2e/auth.test.ts +++ b/e2e/auth.test.ts @@ -67,6 +67,7 @@ test.describe("Passkey Authentication", () => { // Sign in with passkey await page.goto("/auth/login"); + await waitForHydration(page); await page.getByRole("button", { name: /Sign in with Passkey/ }).click(); await expect(page).toHaveURL("/", { timeout: 10000 }); await expect(page.getByRole("navigation").getByRole("button", { name: username })).toBeVisible({ timeout: 5000 }); @@ -79,6 +80,7 @@ test.describe("Passkey Authentication", () => { const authenticatorId = await setupVirtualAuthenticator(cdp); await page.goto("/auth/login"); + await waitForHydration(page); await page.getByRole("button", { name: /Sign in with Passkey/ }).click(); await expect(page.getByText(/No passkey found/i)).toBeVisible({ timeout: 10000 }); diff --git a/playwright.config.ts b/playwright.config.ts index 8acd9d3..6e21e1b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -5,11 +5,7 @@ export default defineConfig({ outputDir: "./e2e/results", fullyParallel: true, retries: process.env.CI ? 2 : 0, - // Locally the journal/planner run under Vite dev — many parallel workers - // overwhelm cold-compile of /api/* routes and cause flaky timeouts on - // first hits. CI runs production builds and is unaffected. Keep at 1 in - // both environments for parity. - workers: 1, + workers: process.env.CI ? 1 : undefined, reporter: process.env.CI ? [["github"], ["html", { open: "never" }], ["json", { outputFile: "playwright-results.json" }]] : "list",