Commit 66f0f97
test: final Phase 2 fixes — sensei MODULE_CONTEXT + threat title assertions
Three small follow-ups after the full suite run completed for the first time:
- src/lib/sensei/__tests__/system-prompt.test.ts:
MODULE_CONTEXT test had a hardcoded expectedIds list with 'llm' instead of
'jutsu'. Train 2 PR-4b.6.1 renamed the NavId but missed this assertion.
Updated the list to use 'jutsu' and added the 5 PR-4b.1/4b.2 additions
(mitsuke, dna, kagami, arena, buki) that the MODULE_CONTEXT map now carries.
- src/components/__tests__/threat-radar.test.tsx &
- src/components/__tests__/threat-trend-widget.test.tsx:
`screen.getByText(/Threat|Radar/i)` matched multiple elements once the real
WidgetCard rendered its title alongside the inner component's own title text.
Switched to `getAllByText(...).length > 0` which is semantically equivalent
and tolerant of the multi-match.
Final suite state (783/790 files, 11950/11984 tests = 99.72% pass rate):
Remaining 34 failures are all confirmed pre-existing bugs, verified at commit
439dad0 (pre-Train-2 tip). None are Train 2 regressions. Breakdown:
- route-guard.test.ts (24): pre-existing handler returns 500 in test env
- admin-validation-api.test.ts (3): same 500 handler issue
- kill-count.test.tsx (3): UI label text drift
- guard-stats-card.test.tsx (1): donut segment rendering
- llm-jutsu-widget.test.tsx (1): fallback count mismatch
- agentic/route.test.ts (2): json.data.scenario missing from response
All logged in team/lessonslearned.md for follow-up in the next test pass.
Train 2 test regression fix pass is complete — PR-4c.1 can now open.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5312a63 commit 66f0f97
3 files changed
Lines changed: 9 additions & 4 deletions
File tree
- packages/dojolm-web/src
- components/__tests__
- lib/sensei/__tests__
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | | - | |
| 129 | + | |
127 | 130 | | |
| 131 | + | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
0 commit comments