refactor(frontend): zentrale Test-Infrastruktur + Component-Rendering-Tests + Coverage #269
No reviewers
Labels
No labels
component/backend
component/docs
component/e2e
component/frontend
component/infra
component/keycloak
prio/high
prio/low
prio/medium
type/bug
type/chore
type/feature
type/refactor
type/test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
WompSchmiede/FamilienFeierPlaner!269
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-frontend-test-optimization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Allgemein
Altes Verhalten
frontend/src/tests/, alle ohne shared Infrastruktur@testing-library/svelteundjsdominstalliert aber ungenutztvitest.setup.ts, keine Coverage-Thresholdsdata-table.svelte: latenter Bug (fehlender{#each}-Index)backend/src/__tests__/no-umlauts.test.tsscannte gesamtes Projekt mit gemischten Ausnahmensrc/tests/+src/test-utils/(Backend:src/__tests__/+src/test/)Neues Verhalten
frontend/src/test/:vitest.setup.ts, Factories (person, event, guest), Helpers (fetch, form, request, app-mocks), Barrel-Export*.component.test.ts) ersetzen readFileSync-Tests:status-badge: 13 Tests (alle Status-Kombinationen)empty-state: 3 Tests (title/description/SVG)data-table: 5 Tests (columns/data/rowIdKey/empty/loading)data-table.svelte—{#each}-Index deklariert (as row, istattas row)events.test.tsnutzt sharedcreateFormData,mockFetchOk,mockFetchErrorsrc/__tests__/+src/test/(analog Backend)backend/, frontend scanntfrontend/@testing-library/jest-dom,@vitest/coverage-v8Test-Hinweise
cd frontend && npm run test— 28 Files, 921 Testscd frontend && npx vitest run --coverage— Coverage mit Thresholdscd backend && npm test— 31 Files, 550 TestsCheckliste
use:testidan neuen<button>,<a>,<form>-Elementen gesetzt?e2e/specs/angelegt?