chore(repo): initialize planarchy workspace

This commit is contained in:
2026-03-14 14:31:09 +01:00
commit dd55d0e78b
769 changed files with 166461 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
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(/\/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();
});
});