From b219cc51a083ba9238ad7571936f4b7ac4fcbd88 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 14 Jan 2026 16:25:48 +0000 Subject: [PATCH] test(e2e): wait for locale navigation to complete Locale switch can take longer in dev; wait explicitly for /de URL after click. Co-authored-by: dennis --- e2e/i18n.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.ts index 1410791..118a639 100644 --- a/e2e/i18n.spec.ts +++ b/e2e/i18n.spec.ts @@ -10,8 +10,10 @@ test.describe("i18n routing", () => { // Verify an EN label is present before switching (nav.home) await expect(page.getByRole("link", { name: "Home" })).toBeVisible(); - await deButton.click(); - await expect(page).toHaveURL(/\/de(\/|$)/); + await Promise.all([ + page.waitForURL(/\/de(\/|$)/, { timeout: 30000 }), + deButton.click(), + ]); // Verify the nav label updates after switching await expect(page.getByRole("link", { name: "Start" })).toBeVisible();