Repair the tooltip tests left behind by two refactors #326
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!326
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/repair-stale-tooltip-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
main's test job has been red since around #309 (Aug 8) — 14 failing cases, none of them a product bug. Two refactors landed correctly; their tests weren't carried forward.Cause 1 — nine tests died at class load
They reflected on per-power methods (
AppendAggressionPowerStats, …) that #309 deleted when it folded them into two shared renderers. They threwTypeInitializationExceptionbefore reaching any assertion.They now go through the renderers the game actually uses:
AppendCanonicalMetaPowerStats— the full view a shared meta-power record showsAppendMetaPowerLifetimeStats(detailed: false)— the compact rows a physical Power card showsResolving a card to its definition needs the game's model db, so that step stays covered by
MetaPowerRegistry's own tests rather than being faked with an uninitialized card.Ids now come from the registry instead of hand-written
"POWER.X"constants — which is the bug #309 itself fixed: ids derive from the game's types, so a copied constant stops matching the moment a type is renamed.Cause 2 — every average computed as zero
The averages moved onto dedicated
Rate*numerators over sharedMeta*turn denominators. The fixtures set neither, so each ratio divided by zero. They now populate both halves, chosen so the expected value in each test still means what it meant before — 18 strength over 6 active turns is still 3.Cause 3 — reworded and icon-ised labels
Avg triggers per turn once active→Avg triggers / active turn;Orbs created→ an orb icon followed bycreated. Those assert on the row's[hint], which preserves the original wording.Three assertions dropped, deliberately
The rows they pinned no longer exist:
Flagging these explicitly: they're the only places where behaviour, not just naming, changed. If any was an unintended loss in #309, this PR pins the current behaviour and the fix belongs in
Core, not here.Verification
2128 passed, 0 failed, against a captured baseline of 12 failing tests on unmodifiedmain. Diffed the failure sets at each step to confirm no new failures were introduced along the way.Tests only — no
Corechanges.🤖 Generated with Claude Code