diff --git a/apps/web/e2e/first-run-onboarding-ux.spec.ts b/apps/web/e2e/first-run-onboarding-ux.spec.ts index 630b2da..31c71f9 100644 --- a/apps/web/e2e/first-run-onboarding-ux.spec.ts +++ b/apps/web/e2e/first-run-onboarding-ux.spec.ts @@ -21,6 +21,7 @@ test("onboarding names the first Oo and shows it in chat", async ({ page }) => { test("German UI keeps Deutsch on language skip label", async ({ page }) => { await page.addInitScript(() => { Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true }); + localStorage.setItem("rakazo.uiLocale", "de"); }); const stamp = Date.now(); await signup(page, `de-skip-${stamp}@rakazo.test`, "password12", "Deutsch"); @@ -35,6 +36,7 @@ test("German UI keeps Deutsch on language skip label", async ({ page }) => { test("German voice step lists German voices after choosing Deutsch", async ({ page }) => { await page.addInitScript(() => { Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true }); + localStorage.setItem("rakazo.uiLocale", "de"); }); const stamp = Date.now(); await signup(page, `de-voice-${stamp}@rakazo.test`, "password12", "Stimme"); @@ -52,6 +54,7 @@ test("German voice step lists German voices after choosing Deutsch", async ({ pa test("main conversation does not show a group subtitle for one Oo", async ({ page }) => { await page.addInitScript(() => { Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true }); + localStorage.setItem("rakazo.uiLocale", "de"); }); const stamp = Date.now(); await signup(page, `main-1-1-${stamp}@rakazo.test`, "password12", "Solo"); diff --git a/apps/web/e2e/helpers.ts b/apps/web/e2e/helpers.ts index be58823..5a73e7a 100644 --- a/apps/web/e2e/helpers.ts +++ b/apps/web/e2e/helpers.ts @@ -87,6 +87,12 @@ async function visible(locator: Locator, timeout: number) { return locator.isVisible({ timeout }).catch(() => false); } +/** After the look picker, skip the optional Oo naming step (keeps the default name). */ +export async function skipOnboardingNameStep(page: Page) { + await expect(page.getByTestId("onboarding-name-step")).toBeVisible(); + await page.getByRole("button", { name: "Skip", exact: true }).click(); +} + /** * Walks the first-run wizard, which lands in the main conversation with the main bot's first * onboarding question pending (the composer works regardless). Unless `mainConversation` is diff --git a/apps/web/e2e/heute-brief.spec.ts b/apps/web/e2e/heute-brief.spec.ts index 612fc4e..8b1e001 100644 --- a/apps/web/e2e/heute-brief.spec.ts +++ b/apps/web/e2e/heute-brief.spec.ts @@ -85,7 +85,8 @@ 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 expect(page).toHaveURL(/\/app\/heute$/); + await expect(page.getByTestId("heute-brief")).toBeVisible(); await expect(page.getByTestId(`heute-habit-${habit.id}`).getByRole("checkbox")).toBeChecked(); // Check-in times live behind one compact control. diff --git a/apps/web/e2e/onboarding-emoji-first.spec.ts b/apps/web/e2e/onboarding-emoji-first.spec.ts index 51e1bf8..9572b68 100644 --- a/apps/web/e2e/onboarding-emoji-first.spec.ts +++ b/apps/web/e2e/onboarding-emoji-first.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from "@playwright/test"; -import { captureScreenshot, signup } from "./helpers"; +import { captureScreenshot, signup, skipOnboardingNameStep } from "./helpers"; test.beforeEach(async ({ page }) => { await page.route("**/rpc/integrationSetup/get", (route) => @@ -49,11 +49,12 @@ test("emoji-first onboarding: shape + color selection with live preview", async if (testInfo) await captureScreenshot(page, testInfo, "02-shape-color-preview"); - // Click Continue → goes to the language step + // Click Continue → naming, then language. await page .getByRole("button", { name: /Continue/i }) .first() .click(); + await skipOnboardingNameStep(page); // Step 2: Language selection await expect(page.getByRole("heading", { name: /Choose your language/i })).toBeVisible(); @@ -96,6 +97,7 @@ test("onboarding: skip language defaults to English", async ({ page }) => { .getByRole("button", { name: /Continue/i }) .first() .click(); + await skipOnboardingNameStep(page); // Language step — click Skip, then skip voice. await expect(page.getByRole("heading", { name: /Choose your language/i })).toBeVisible(); diff --git a/apps/web/e2e/onboarding-oo-swipe.spec.ts b/apps/web/e2e/onboarding-oo-swipe.spec.ts index 0789ace..4b5f343 100644 --- a/apps/web/e2e/onboarding-oo-swipe.spec.ts +++ b/apps/web/e2e/onboarding-oo-swipe.spec.ts @@ -1,6 +1,6 @@ import type { Page } from "@playwright/test"; import { expect, test } from "@playwright/test"; -import { captureScreenshot, signup } from "./helpers"; +import { captureScreenshot, signup, skipOnboardingNameStep } from "./helpers"; test.beforeEach(async ({ page }) => { await page.route("**/rpc/integrationSetup/get", (route) => @@ -77,5 +77,6 @@ test("mobile onboarding: category pick and swipe look previews", async ({ page } .getByRole("button", { name: /Continue/i }) .first() .click(); + await skipOnboardingNameStep(page); await expect(page.getByRole("heading", { name: /Choose your language/i })).toBeVisible(); }); diff --git a/apps/web/e2e/user-profile.spec.ts b/apps/web/e2e/user-profile.spec.ts index 8d5840e..21cf71a 100644 --- a/apps/web/e2e/user-profile.spec.ts +++ b/apps/web/e2e/user-profile.spec.ts @@ -4,7 +4,14 @@ * with its origin, confirms a pending one, and forgets one or all of them. */ import { expect, test } from "@playwright/test"; -import { captureScreenshot, openUserSettings, rpc, signup, waitForChatComposer } from "./helpers"; +import { + captureScreenshot, + openUserSettings, + rpc, + signup, + skipOnboardingNameStep, + waitForChatComposer, +} from "./helpers"; test.use({ timezoneId: "Europe/Vienna" }); @@ -34,6 +41,7 @@ test("onboarding feeds the profile; facts can be confirmed and forgotten", async timeout: 30_000, }); await page.getByRole("button", { name: "Continue", exact: true }).click(); + await skipOnboardingNameStep(page); await expect(page.getByRole("heading", { name: /Choose your language/i })).toBeVisible(); await page.getByRole("button", { name: "English", exact: true }).click();