Re-verified all 59 tests in SemanticNarrativePanel.test.ts pass.
The issue was already fixed in commit 6237010 (bf-48nk).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1.7 KiB
1.7 KiB
BF-3OY5: SemanticNarrativePanel Tests - Already Fixed
Issue
3 tests in src/tui/components/SemanticNarrativePanel.test.ts were reported as failing:
- "should refresh narrative from manager"
- "should generate narrative for worker and set it"
- "should generate aggregated narrative and set it"
Root Cause
The tests were failing due to missing required fields in mock narrative objects. When the SemanticNarrative type was updated to require:
workerId: stringevents: LogEvent[]startTime: numberendTime: numberdurationMs: number
The test mocks were not updated accordingly, causing type mismatches and runtime errors.
Fix Applied
The fix was already applied in commit 62370103685d6f629e7335d397c6dadb1c4cfe23:
- Added all required fields to
createMockNarrative()helper - Added missing fields to all inline narrative segment mocks throughout tests
- Changed
entities.workersarray (incorrect) toworkerIdstring (correct)
Verification
All 59 tests in SemanticNarrativePanel.test.ts now pass:
✓ src/tui/components/SemanticNarrativePanel.test.ts (59 tests) 37ms
Re-verified on 2026-05-22:
✓ src/tui/components/SemanticNarrativePanel.test.ts (59 tests) 110ms
The three specific tests mentioned in the issue:
- ✓ "should refresh narrative from manager" - PASS
- ✓ "should generate narrative for worker and set it" - PASS
- ✓ "should generate aggregated narrative and set it" - PASS
The implementation methods (refresh(), updateFromWorker(), updateAggregated()) were always correct - they properly:
- Call the SemanticNarrative manager methods
- Pass results to
setNarrative() - Trigger render via
this.box.screen.render()
The failure was purely a test data issue, not an implementation bug.