forked from eva/focus-flow
1.7 KiB
1.7 KiB
V1 Block 25 — Scheduler Integration Tests
Purpose: End‑to‑end tests.
Note for Codex: Follow tasks exactly; avoid exploratory calls when tasks specify names/files/tests.
Chunk 25.1 — Integration test harness
Recommended level: HIGH
Status: Complete on 2026-06-26.
Tasks
- Add test file
integration/scheduler_flow_test.dartinpackages/scheduler_integration_tests. - Spin up InMemory repos, schedule engine, fake notification adapter.
- Create tasks, invoke scheduler, assert placements, save via SQLite adapter, reload and assert persistence.
Acceptance criteria
- Test passes on CI in < 2s runtime.
Completed implementation
- Added package
packages/scheduler_integration_tests. - Added required integration test file
integration/scheduler_flow_test.dart. - Added test wrapper
test/scheduler_flow_test.dartso package-leveldart testruns the integration flow. - Integration flow seeds
InMemoryTaskRepository, invokesSchedulingEngine.insertBacklogTaskIntoNextAvailableSlot, asserts task placement, schedules throughFakeNotificationAdapter, saves throughSqliteTaskRepository, reloads, and asserts persisted schedule/status. - Added an in-test runtime guard asserting the flow completes in under 2 seconds.
- Wired integration test into the root test wrapper.
Verification
dart pub get: passed.dart format test/scheduler_core_test.dart packages/scheduler_integration_tests: passed.cd packages/scheduler_integration_tests && dart analyze: passed, no issues found.cd packages/scheduler_integration_tests && dart test: passed, 1 test.dart analyze: passed, no issues found.dart test: passed, 333 tests.scripts/test.sh: not present or not executable.