import { expect, test } from "@playwright/test"; test("onboarding flow redirects new user and saves profile", async ({ page, }) => { await page.goto("/"); // PGlite WASM initialization takes time; wait for the redirect to complete await expect(page).toHaveURL(/onboarding/, { timeout: 15000 }); await page.getByLabel("Name").fill("Max Mustermann"); await page.getByLabel("PLZ").fill("10115"); await page.getByLabel("Ort").fill("Berlin"); await page.getByLabel("Krankenkasse").fill("TK"); await page.getByRole("button", { name: "Weiter" }).click(); await expect(page).toHaveURL(/prozess/, { timeout: 10000 }); await expect(page.getByText("Dein Fortschritt")).toBeVisible(); });