From 83ec966a6750e4a64dd0c6a7b5c7753667926bcf Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 6 Oct 2026 17:01:08 +0000 Subject: [PATCH] Harden Heute route and German voice onboarding E2E Rebased onto main with Expo SDK 57 typecheck fixes. Voice options expose stable test ids; Shell keeps /app/heute across bootstrap and redirects legacy /app/heute bot URLs. Heute coach E2E asserts URL after reload. Co-authored-by: cynarAI --- apps/web/e2e/first-run-onboarding-ux.spec.ts | 10 ++++------ apps/web/e2e/heute-brief.spec.ts | 3 +-- .../components/onboarding/OnboardingVoiceStep.tsx | 1 + apps/web/src/pages/Shell.tsx | 15 ++++++++++++--- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/web/e2e/first-run-onboarding-ux.spec.ts b/apps/web/e2e/first-run-onboarding-ux.spec.ts index c89b968..b0e2306 100644 --- a/apps/web/e2e/first-run-onboarding-ux.spec.ts +++ b/apps/web/e2e/first-run-onboarding-ux.spec.ts @@ -49,12 +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, }); - 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|Bernd/i, pressed: true }).first(), - ).toBeVisible(); + await expect(page.getByTestId("onboarding-voice-df_eva")).toBeVisible({ timeout: 30_000 }); + await expect(page.getByTestId("onboarding-voice-dm_bernd")).toBeVisible(); + await expect(page.getByTestId("onboarding-voice-af_alloy")).toHaveCount(0); + await expect(page.getByTestId("onboarding-voice-df_eva")).toHaveAttribute("aria-pressed", "true"); }); 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 60b289c..4caac78 100644 --- a/apps/web/e2e/heute-brief.spec.ts +++ b/apps/web/e2e/heute-brief.spec.ts @@ -84,8 +84,7 @@ test("Heute shows the coach's brief, habits and goals, checks habits off and set await expect(page.getByTestId(`heute-habit-streak-${habit.id}`)).toHaveText("3 days"); await captureScreenshot(page, testInfo, "heute-coach"); - await page.reload(); - await page.goto("/app/heute", { waitUntil: "domcontentloaded" }); + await page.reload({ 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(); diff --git a/apps/web/src/components/onboarding/OnboardingVoiceStep.tsx b/apps/web/src/components/onboarding/OnboardingVoiceStep.tsx index d72aaa5..37d7704 100644 --- a/apps/web/src/components/onboarding/OnboardingVoiceStep.tsx +++ b/apps/web/src/components/onboarding/OnboardingVoiceStep.tsx @@ -92,6 +92,7 @@ export function OnboardingVoiceStep({