bilhej/frontend
Joakim Mörling 0f613b21a6
Some checks failed
CI / Lint, type check, unit tests, coverage (push) Successful in 11m18s
CI / E2E browser tests (push) Failing after 54s
fix: allow frontend container host in vite preview and update payment E2E tests
fix: add preview.allowedHosts and preview.host to vite.config.ts

Vite preview server blocks requests from non-localhost hosts by default.
In the E2E Docker Compose stack, Playwright accesses the frontend via
http://frontend (container hostname). Without allowedHosts, Vite returns
"Blocked request. This host is not allowed." and the SPA never mounts,
causing all 59 E2E tests to fail with blank pages and missing elements.

- Add preview.host: true (bind to 0.0.0.0)
- Add preview.allowedHosts: ['frontend', 'localhost']

test: update payment-redirect E2E tests to match current UI

The payment page was redesigned to a two-step confirmation flow:
"Jag har betalat" → confirmation → "Ja, jag har betalat". The E2E
tests still referenced the old single-step "Genomför testbetalning"
button and a removed .payment__note CSS class.

- Update 'payment button marks order as paid' to click through both steps
- Rename 'shows mock payment note' to 'shows Swish payment instructions'
  and assert on actual UI elements (Swish label + payment button)

Result: E2E suite now passes 59/59 tests in the Docker Compose CI stack.
2026-05-19 19:40:40 +02:00
..
e2e fix: allow frontend container host in vite preview and update payment E2E tests 2026-05-19 19:40:40 +02:00
public refactor: add design system with CSS tokens, utilities, and app shell 2026-05-16 16:09:35 +02:00
src feat: replace Stripe mock with manual Swish payment flow 2026-05-19 19:23:37 +02:00
.gitignore feat: add login page with Playwright E2E tests 2026-05-13 19:17:29 +02:00
.prettierrc feat: scaffold Vue 3 + Vite frontend with TypeScript, Router, Pinia, Vitest, ESLint, Prettier 2026-05-01 00:52:38 +02:00
eslint.config.ts feat: scaffold Vue 3 + Vite frontend with TypeScript, Router, Pinia, Vitest, ESLint, Prettier 2026-05-01 00:52:38 +02:00
index.html refactor: add design system with CSS tokens, utilities, and app shell 2026-05-16 16:09:35 +02:00
package-lock.json chore: add vitest coverage enforcement to frontend 2026-05-15 12:15:55 +02:00
package.json chore: add vitest coverage enforcement to frontend 2026-05-15 12:15:55 +02:00
playwright.config.ts feat: add login page with Playwright E2E tests 2026-05-13 19:17:29 +02:00
README.md feat: scaffold Vue 3 + Vite frontend with TypeScript, Router, Pinia, Vitest, ESLint, Prettier 2026-05-01 00:52:38 +02:00
tsconfig.app.json fix: E2E pipeline — vite preview instead of nginx, ts build fixes 2026-05-19 18:53:52 +02:00
tsconfig.json feat: scaffold Vue 3 + Vite frontend with TypeScript, Router, Pinia, Vitest, ESLint, Prettier 2026-05-01 00:52:38 +02:00
tsconfig.node.json feat: scaffold Vue 3 + Vite frontend with TypeScript, Router, Pinia, Vitest, ESLint, Prettier 2026-05-01 00:52:38 +02:00
vite.config.ts fix: allow frontend container host in vite preview and update payment E2E tests 2026-05-19 19:40:40 +02:00

Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.