bilhej/frontend/e2e
Joakim Mörling 5fa903d9af feat: build out compose page with template selector, letter editor, and preview
- Add createOrder(plate, template, letterText) to frontend api/orders.ts
- Create data/templates.ts with 6 Swedish letter templates (Komplimang,
  Jag vill köpa din bil, Tips / servicebehov, Synpunkter på körbeteende,
  Tuta / frustration, Fritt meddelande) with pre-filled body text
- Rewrite ComposePage.vue with full compose flow:
  - Template selector dropdown (Fritt meddelande selected by default)
  - Textarea with 1000-char limit and live character counter
  - Inline A4 letter preview with plate, body, and GDPR Art. 14 footer
  - 'Skicka brev (49 kr)' submit button, disabled when empty
  - On success: redirects to /orders; on error: shows error message
  - Shows error with back link if no plate in route query
- Add 12 Vitest tests for ComposePage (template fill, char counter, submit
  validation, createOrder call, navigation, null template for Fritt meddelande)
- Add 8 Playwright E2E tests (auth guard, no-plate error, template selection,
  textarea edit, submit button state, order creation, preview content)
2026-05-14 16:02:14 +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: build out compose page with template selector, letter editor, and preview 2026-05-14 16:02:14 +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 feat: add order history page with API endpoint and seeded test data 2026-05-14 15:30:36 +02:00
register.spec.ts feat: add login page with Playwright E2E tests 2026-05-13 19:17:29 +02:00