- install playwright, configure for chromium with vite dev server - add onboarding flow test: redirect, form fill, navigation to prozess - add contact tracker test: create contact, verify in list - fix onboarding form navigating to /onboarding instead of /prozess - fix date rendering crash in contact list (cast datum to text) - exclude @electric-sql/pglite from vite optimizeDeps (WASM bundle) - add test-results/, playwright-report/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
691 B
TypeScript
19 lines
691 B
TypeScript
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();
|
|
});
|