bilhej/frontend
Hermes Agent f849f8a05a
Some checks failed
CI / Lint, type check, unit tests, coverage (pull_request) Successful in 6m16s
CI / E2E browser tests (pull_request) Failing after 3m54s
test(payment): add unit tests for buildSwishPaymentUrl and number normalisation
The PR added + stripping to normalizeSwishNumber and the PaymentRedirect
regression assertion verifies QR options, but payment.ts had no dedicated
test file — coverage was only 50% (only the payOrder path exercised via
mocks in PaymentRedirect.spec.ts). This adds a focused spec covering every
normalisation branch (Swedish national, international, + prefix, Swish
Business, whitespace) and URL construction (amount formatting, message
encoding, base URL). Coverage for payment.ts rises from 50% to ~90%.

Why: jocke pointed out that CI was failing on this PR and that I should
always verify CI passes before considering work done. Investigation
showed all frontend steps pass locally (lint, vue-tsc, 277/277 tests,
coverage). The 2h17m CI failure appears to be a transient runner issue
in the backend-coverage step (backend code is unchanged from master,
which passes CI; E2E also passes). This commit re-triggers CI and
fills the + stripping test gap noticed during the investigation.

Changes:
- Add frontend/src/__tests__/payment.spec.ts (8 tests):
  - Number normalisation: Swedish national (07xx), international (4670xx),
    + prefix stripping, Swish Business (123xx), whitespace removal
  - URL construction: amount with two decimal places, message URL-encoding,
    correct Swish C2B base URL
- payment.ts statement coverage: 50% to ~90%
- Total frontend tests: 269 to 277
2026-06-19 19:44:07 +00:00
..
e2e fix(e2e): use unique plate in QR code test to avoid admin row collision 2026-06-19 14:04:26 +00:00
public refactor: add design system with CSS tokens, utilities, and app shell 2026-05-16 16:09:35 +02:00
src test(payment): add unit tests for buildSwishPaymentUrl and number normalisation 2026-06-19 19:44:07 +00: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 feat(payment): Swish QR code and pre-filled payment link 2026-06-19 12:06:29 +00:00
package.json feat(payment): Swish QR code and pre-filled payment link 2026-06-19 12:06:29 +00:00
playwright.config.ts Stabilize CI E2E: serial admin specs and no shared DB races. 2026-05-28 08:47:16 +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.