a83edb2f9d
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>
25 lines
944 B
TypeScript
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();
|
|
});
|
|
});
|