test(web): give the admin page mock the fingerprint coverage query
test-web / test (push) Successful in 35s
release / Build signed APK (releases and dev) (push) Successful in 4m25s
release / Build + push container image (push) Successful in 34s
release / Verify release artifacts (tag releases only) (push) Skipped

b8855b48 made the admin overview page create a fingerprint coverage
query, but admin.test.ts mocks $lib/api/admin with an explicit factory
that only returned the cover coverage query. Every test that renders
the page threw on the missing export (run 6512, 11 failures). The mock
now returns it in the same empty-store shape, so the gauge stays hidden
in these tests the way the cover gauge does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SQ31KQpYbStyK5y58UmPLH
This commit is contained in:
2026-09-11 15:00:38 -04:00
co-authored by Claude Opus 5
parent b8855b480f
commit 21c698a616
+6
View File
@@ -35,6 +35,12 @@ vi.mock('$lib/api/admin', async () => {
isPending: false, isPending: false,
isError: false isError: false
}), }),
createFingerprintCoverageQuery: () =>
readable({
data: undefined,
isPending: false,
isError: false
}),
approveRequest: vi.fn().mockResolvedValue({}), approveRequest: vi.fn().mockResolvedValue({}),
rejectRequest: vi.fn().mockResolvedValue({}), rejectRequest: vi.fn().mockResolvedValue({}),
resolveQuarantine: vi.fn().mockResolvedValue({}), resolveQuarantine: vi.fn().mockResolvedValue({}),