Files
CapaKraken/apps/web/e2e/auth.spec.ts
T
Hartmut a83edb2f9d feat: timeline UI overhaul with project/resource panel redesign, quick filters, and API improvements
Redesigned timeline project and resource panels with expanded detail views,
added quick filter toolbar, improved drag handling, and enhanced vacation/entitlement
router logic. Includes e2e test updates and minor API fixes.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 09:28:59 +01:00

25 lines
944 B
TypeScript

import { expect, test } from "@playwright/test";
test.describe("Authentication", () => {
test("redirects unauthenticated users to sign-in", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveURL(/\/auth\/signin/);
});
test("admin can sign in", async ({ page }) => {
await page.goto("/auth/signin");
await page.fill('input[type="email"]', "admin@planarchy.dev");
await page.fill('input[type="password"]', "admin123");
await page.click('button[type="submit"]');
await expect(page).toHaveURL(/\/(dashboard|resources)/);
});
test("shows error on invalid credentials", async ({ page }) => {
await page.goto("/auth/signin");
await page.fill('input[type="email"]', "wrong@example.com");
await page.fill('input[type="password"]', "wrongpass");
await page.click('button[type="submit"]');
await expect(page.locator("text=Invalid email or password")).toBeVisible();
});
});