From 628b008e2a6a0528e8532eb9264c8d6cc3917f11 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 6 Oct 2026 15:17:56 +0000 Subject: [PATCH] Stabilize Heute reload URL and German voice E2E assertions Co-authored-by: cynarAI --- apps/web/e2e/first-run-onboarding-ux.spec.ts | 10 +++------- apps/web/e2e/heute-brief.spec.ts | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/web/e2e/first-run-onboarding-ux.spec.ts b/apps/web/e2e/first-run-onboarding-ux.spec.ts index 125d21b..66a1a7d 100644 --- a/apps/web/e2e/first-run-onboarding-ux.spec.ts +++ b/apps/web/e2e/first-run-onboarding-ux.spec.ts @@ -49,14 +49,10 @@ test("German voice step lists German voices after choosing Deutsch", async ({ pa 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, - }); + const germanVoice = page.getByRole("button", { name: /^(Eva|Bernd)$/i }); + await expect(germanVoice.first()).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", - "true", - ); + await expect(germanVoice.filter({ has: page.locator('[aria-pressed="true"]') }).first()).toBeVisible(); }); test("main conversation does not show a group subtitle for one Oo", async ({ page }) => { diff --git a/apps/web/e2e/heute-brief.spec.ts b/apps/web/e2e/heute-brief.spec.ts index f999d36..60b289c 100644 --- a/apps/web/e2e/heute-brief.spec.ts +++ b/apps/web/e2e/heute-brief.spec.ts @@ -85,7 +85,7 @@ test("Heute shows the coach's brief, habits and goals, checks habits off and set await captureScreenshot(page, testInfo, "heute-coach"); await page.reload(); - await openHeute(page); + await page.goto("/app/heute", { waitUntil: "domcontentloaded" }); await expect(page).toHaveURL(/\/app\/heute$/); await expect(page.getByTestId("heute-brief")).toBeVisible(); await expect(page.getByTestId(`heute-habit-${habit.id}`).getByRole("checkbox")).toBeChecked();