bilhej/frontend/e2e
Joakim Mörling 668cd023be test: add admin dashboard Vitest and Playwright E2E tests
Vitest (14 tests) — AdminDashboard.spec.ts:
  - renders heading, subtitle, table columns, order data in rows
  - shows loading, empty, and error states
  - fetches GET /api/admin/orders on mount
  - expands row on click to reveal letter content (Brevtext label)
  - collapses row on second click
  - only one row expanded at a time (clicking row 2 closes row 1)
  - status dropdown change fires PATCH /api/admin/orders/{id}/status
    with correct URL, method, and JSON body
  - shows error message on failed status update

Playwright E2E (8 tests) — admin-dashboard.spec.ts:
  - admin login (admin@bilhalsning.se / test1234) before each test
  - admin can navigate to /admin and see heading
  - non-admin user (test@bilhalsning.se) is redirected away from /admin
  - table renders Datum/E-post/Regnr/Status column headers
  - seeded order plates visible (ABC123, DEF456, GHI789)
  - click row expands letter content
  - click again collapses letter content
  - status dropdown change persists (selectOption delivered)
  - unauthenticated access redirects to login with ?redirect=/admin
2026-05-15 12:15:36 +02:00
..
admin-dashboard.spec.ts test: add admin dashboard Vitest and Playwright E2E tests 2026-05-15 12:15:36 +02:00
auth-guards.spec.ts feat: add Vue Router auth guards with admin role support 2026-05-14 12:39:17 +02:00
compose.spec.ts feat: add template picker modal to compose page 2026-05-14 17:39:21 +02:00
header-auth.spec.ts feat: add orders link to header nav for authenticated users 2026-05-14 15:31:06 +02:00
login.spec.ts feat: add Vue Router auth guards with admin role support 2026-05-14 12:39:17 +02:00
order-history.spec.ts refactor: remove template from order flow 2026-05-14 16:55:59 +02:00
register.spec.ts feat: add login page with Playwright E2E tests 2026-05-13 19:17:29 +02:00