31 lines
943 B
Markdown
31 lines
943 B
Markdown
|
|
# Task ID: 122
|
||
|
|
|
||
|
|
**Title:** Update clearAllTables test helper
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** 117, 118, 119, 120, 121
|
||
|
|
|
||
|
|
**Priority:** high
|
||
|
|
|
||
|
|
**Description:** Add deleteMany calls for all new models to clearAllTables in src/db/tests/helpers.ts
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
In src/db/tests/helpers.ts clearAllTables function:
|
||
|
|
1. Add deleteMany for TaskEvent (child first)
|
||
|
|
2. Add deleteMany for TaskVerdict
|
||
|
|
3. Add deleteMany for AgentSession
|
||
|
|
4. Add deleteMany for Task
|
||
|
|
5. Add deleteMany for EpicTaskEdge
|
||
|
|
6. Add deleteMany for EpicTask
|
||
|
|
7. Add deleteMany for Epic
|
||
|
|
8. Add deleteMany for CodeRepo
|
||
|
|
9. Add deleteMany for AgentProject
|
||
|
|
10. Order matters: delete children before parents to avoid FK violations
|
||
|
|
11. Follow existing pattern in the file
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Run existing test suite to verify clearAllTables works correctly with new models. Add explicit test that creates rows in all new tables then calls clearAllTables and verifies tables are empty.
|