Files
EpicNext-Cms/e2e/auth.spec.ts
T
openhands 423a33200e
CI / check (push) Failing after 14s
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 2m38s
chore: improve tooling, linting, testing, and CI
- Add LICENSE file (CC BY-NC-SA 4.0)
- Add .nvmrc pinning Node 22
- Add Renovate config with daily schedule and Gitea Actions workflow
- Reduce ESLint max-warnings from 1000 to 50
- Re-enable Biome a11y/security recommended rules
- Fix Biome lint issues (a11y, hook deps, SVG labels, checkbox semantics)
- Improve CI: run on pushes to feat/fix branches, add pnpm audit
- Add Vitest coverage with v8 provider and thresholds
- Add E2E tests (auth, admin, navigation specs)
- Add admin-maintenance server action test
- Install @vitest/coverage-v8
- Ignore coverage/ directory
2026-07-27 17:03:09 +02:00

33 lines
1.2 KiB
TypeScript

import { expect, test } from "@playwright/test";
test.describe("Authentication flows", () => {
test("login form validates required fields", async ({ page }) => {
await page.goto("/login");
await page.click('button[type="submit"]');
await expect(page.locator("text=required")).toBeVisible({ timeout: 5000 });
});
test("login with invalid credentials shows error", async ({ page }) => {
await page.goto("/login");
await page.fill('input[name="username"]', "nonexistent");
await page.fill('input[name="password"]', "wrongpassword");
await page.click('button[type="submit"]');
await expect(page.locator("text=invalid")).toBeVisible({ timeout: 5000 });
});
test("register page has password confirmation field", async ({ page }) => {
await page.goto("/register");
await expect(page.locator('input[name="confirmPassword"]')).toBeVisible();
});
test("register form validates password match", async ({ page }) => {
await page.goto("/register");
await page.fill('input[name="password"]', "Password123!");
await page.fill('input[name="confirmPassword"]', "DifferentPass123!");
await page.click('button[type="submit"]');
await expect(page.locator("text=match|komen overeen|kloppen")).toBeVisible({
timeout: 5000,
});
});
});