chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo content deleted, auth-only reference feature, web-next shell, all gates green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor library traces, and product naming are curated out; generic template repairs (coverage provider devDeps, root test:coverage script, live lint fixes, root-only release-please) are kept. See TEMPLATE.md for provenance, curation list, and usage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
34
apps/web-next/e2e/auth-sign-in.spec.ts
Normal file
34
apps/web-next/e2e/auth-sign-in.spec.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
// Surviving e2e baseline (platform-retrofit PRD): the dev-seed shell must
|
||||
// sign in with seeded credentials (see packages/auth/src/__seeds__/dev.ts)
|
||||
// and sign back out. Runs against `pnpm dev` in dev-seed mode — no Payload.
|
||||
test.describe("auth sign-in", () => {
|
||||
test("signs in with dev-seed credentials and reaches the signed-in shell", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
|
||||
await page.getByLabel("Username").fill("alice");
|
||||
await page.getByLabel("Password").fill("secret_alice");
|
||||
await page.getByRole("button", { name: "Sign in" }).click();
|
||||
|
||||
await expect(page.getByText("You are signed in.")).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "Sign out" }).click();
|
||||
await expect(page.getByRole("button", { name: "Sign in" })).toBeVisible();
|
||||
});
|
||||
|
||||
test("rejects invalid credentials and keeps the sign-in form", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
|
||||
await page.getByLabel("Username").fill("alice");
|
||||
await page.getByLabel("Password").fill("not-the-password");
|
||||
await page.getByRole("button", { name: "Sign in" }).click();
|
||||
|
||||
await expect(page.getByText("Invalid username or password.")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Sign in" })).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user