kanban-dev-webapp/tests/integration
Dave b96f38a259 fix(test): tighten log-work assertions, repair summarise.test.ts for source exclusion, add owner-only UI check
Critical fixes to test suite:

1. Fix time bomb in summarise.test.ts: Task 4 changed summaryStatus filter to exclude source="manual",
   so the assertion would fail once any manual entry exists. Updated test to count only non-manual
   commits and added coverage proving manual entries are excluded.

2. Tighten log-work metrics assertions from toBeGreaterThanOrEqual to exact equality (toBe).
   The old assertions would miss if manual entries were incorrectly fed into session clustering.
   Use a fresh baseline recompute to catch regression of Task 2's manual exclusion fix.

3. Add recomputeMetrics call in afterAll to restore cache after test cleanup,
   preventing inflated dashboard metrics on the demo project.

4. Fix fixture link_source from "none" to "manual" to match actual logWorkAction behavior
   (Task 6 review fix).

5. Add UI coverage: "Log work" button is owner-only, verifying the security model.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-09-19 13:44:34 +02:00
..
activity-log.test.ts test(permissions): integration coverage for the client write boundary 2026-09-16 09:46:58 +02:00
admin.test.ts test(admin): board invariants, owner-only writes, deactivation 2026-09-16 11:31:38 +02:00
ai-settings.test.ts fix(tests): stop the settings test destroying the configured API key 2026-09-17 08:13:24 +02:00
client-permissions.test.ts test(permissions): integration coverage for the client write boundary 2026-09-16 09:46:58 +02:00
helpers.ts test(ai): settings page never exposes the API key 2026-09-16 15:59:49 +02:00
ingest.test.ts test(ingest): webhook and cron endpoint protection 2026-09-16 11:50:20 +02:00
intake-submit.test.ts test(intake): server-decided fields and project scoping 2026-09-16 18:07:16 +02:00
intake.test.ts test(intake): cap enforcement, brief whitelist, project scoping 2026-09-16 17:56:37 +02:00
linking.test.ts test(metrics): cached figures agree with stored commits + vitest stubs 2026-09-16 15:19:32 +02:00
log-work.test.ts fix(test): tighten log-work assertions, repair summarise.test.ts for source exclusion, add owner-only UI check 2026-09-19 13:44:34 +02:00
metrics.test.ts test(metrics): cached figures agree with stored commits + vitest stubs 2026-09-16 15:19:32 +02:00
narrative.test.ts test(narrative): no invention, and raw-subject fallback 2026-09-16 16:26:29 +02:00
owner-actions.test.ts test(actions): cover audit-log immunity and request flags 2026-09-16 11:06:38 +02:00
project-kind-and-nav.test.ts test(nav): prototype visibility and client scoping on the new home page 2026-09-17 10:42:52 +02:00
roadmap.test.ts test(roadmap): reschedule auditing and role scoping 2026-09-17 07:19:54 +02:00
session-verification.test.ts fix(auth): verify sessions against PocketBase instead of trusting the cookie 2026-09-19 12:47:18 +02:00
summarise.test.ts fix(test): tighten log-work assertions, repair summarise.test.ts for source exclusion, add owner-only UI check 2026-09-19 13:44:34 +02:00
user-rules.test.ts fix(security): lock the users collection against privilege escalation 2026-09-16 11:18:13 +02:00