From 7f35ac1aa9ee7a7d52156680e8edaac9beca5295 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 6 Oct 2026 14:38:05 +0000 Subject: [PATCH] Fix German E2E: Nachricht composer, voice loading wait, Heute rhythm Co-authored-by: cynarAI --- apps/web/e2e/first-run-onboarding-ux.spec.ts | 7 ++++++- apps/web/e2e/helpers.ts | 2 +- apps/web/e2e/heute-brief.spec.ts | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/web/e2e/first-run-onboarding-ux.spec.ts b/apps/web/e2e/first-run-onboarding-ux.spec.ts index 3ac66f8..125d21b 100644 --- a/apps/web/e2e/first-run-onboarding-ux.spec.ts +++ b/apps/web/e2e/first-run-onboarding-ux.spec.ts @@ -46,7 +46,12 @@ test("German voice step lists German voices after choosing Deutsch", async ({ pa await page.getByRole("button", { name: /^(Continue|Weiter)$/i }).click(); await page.getByRole("button", { name: /^(Skip|Überspringen)$/i }).click(); await page.getByRole("button", { name: "Deutsch", exact: true }).click(); - await expect(page.getByRole("button", { name: "Eva", exact: true })).toBeVisible(); + await expect(page.getByText(/Loading voices|Stimmen werden geladen/i)).toHaveCount(0, { + timeout: 30_000, + }); + await expect(page.getByRole("button", { name: "Eva", exact: true })).toBeVisible({ + timeout: 30_000, + }); await expect(page.getByRole("button", { name: "Alloy", exact: true })).toHaveCount(0); await expect(page.getByRole("button", { name: "Eva", exact: true })).toHaveAttribute( "aria-pressed", diff --git a/apps/web/e2e/helpers.ts b/apps/web/e2e/helpers.ts index 43bca4a..515719a 100644 --- a/apps/web/e2e/helpers.ts +++ b/apps/web/e2e/helpers.ts @@ -299,7 +299,7 @@ export async function waitForChatComposer(page: Page) { await expect(page.getByTestId("shell-root")).toHaveAttribute("data-ready", "true", { timeout: 30_000, }); - await expect(page.getByRole("combobox", { name: "Message" })).toBeVisible(); + await expect(page.getByRole("combobox", { name: /^Message$|^Nachricht$/i })).toBeVisible(); } /** Create a named bot via RPC for test setup (skips the + picker). */ diff --git a/apps/web/e2e/heute-brief.spec.ts b/apps/web/e2e/heute-brief.spec.ts index 3cf8043..f999d36 100644 --- a/apps/web/e2e/heute-brief.spec.ts +++ b/apps/web/e2e/heute-brief.spec.ts @@ -92,7 +92,9 @@ test("Heute shows the coach's brief, habits and goals, checks habits off and set // Check-in times live behind one compact control. const rhythm = page.getByTestId("heute-rhythm"); - await expect(rhythm).toBeVisible(); + await expect(page.getByTestId("heute-coach-brief")).toBeVisible(); + await rhythm.scrollIntoViewIfNeeded(); + await expect(rhythm).toBeVisible({ timeout: 30_000 }); const rhythmLoaded = page.waitForResponse( (response) => response.url().includes("/rpc/coach/rhythm/get") && response.ok(), );