Trek_CN/server/tests/integration
jubnl b4922322ae
test: expand test suite to 87.3% backend coverage
Add new integration test files covering previously untested routes:
- categories.test.ts — GET /api/categories
- oidc.test.ts — full OIDC login flow (callback, state, errors)
- settings.test.ts — GET/PUT /api/settings, bulk save
- tags.test.ts — CRUD for trip tags
- todo.test.ts — todo items CRUD and reorder

Add new unit test files covering service-layer logic:
- adminService.test.ts — user/invite management, packing templates, OIDC settings
- atlasService.test.ts — atlas search and place enrichment
- authServiceDb.test.ts — DB-backed auth helpers (login, register, MFA)
- backupService.test.ts — export/import/restore logic
- categoryService.test.ts — category CRUD
- dayService.test.ts — day management and accommodation helpers
- mapsService.test.ts — route/directions helpers
- oidcService.test.ts — OIDC state, auth code, role resolution, user upsert
- packingService.test.ts — packing item/bag/template operations
- placeService.test.ts — place CRUD and tag attachment
- settingsService.test.ts — settings get/set/bulk
- tagService.test.ts — tag CRUD
- todoService.test.ts — todo CRUD and reorder
- tripService.test.ts — trip CRUD, member management, archiving
- vacayService.test.ts — vacay integration helpers
- tripAccess.test.ts (middleware) — requireTripAccess middleware

Expand existing integration and unit test files with additional cases
across admin, atlas, auth, backup, collab, days, files, maps, memories
(Immich/Synology), notifications, places, reservations, share, vacay,
weather, auth middleware, ephemeral tokens, notification preferences,
permissions, SSRF guard, and WebSocket connection tests.

Update test helpers (factories.ts, test-db.ts) with new factory
functions and seed data required by the expanded suite.

Fix minor issues in server/src/routes/reservations.ts and
server/src/services/atlasService.ts surfaced by new test coverage.

Update sonar-project.properties to reflect new coverage thresholds.
2026-04-06 20:08:30 +02:00
..
admin.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
assignments.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
atlas.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
auth.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
backup.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
budget.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
categories.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
collab.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
dayNotes.test.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00
days.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
files.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
immich.test.ts refactor(server): replace node-fetch with native fetch + undici, fix photo integrations 2026-04-05 21:12:51 +02:00
maps.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
mcp.test.ts refactor(mcp): replace direct DB access with service layer calls 2026-04-04 18:12:53 +02:00
memories-immich.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
memories-synology.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
memories-unified.test.ts refactor(server): replace node-fetch with native fetch + undici, fix photo integrations 2026-04-05 21:12:51 +02:00
misc.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
notifications.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
oidc.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
packing.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
places.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
profile.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
reservations.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
security.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
settings.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
share.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
tags.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
todo.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
trips.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
vacay.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
weather.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00