test(@projects/@magic-civilization): 🐛 use real filter id "combat" not "military" in chronicle test
The chronicle panel's filter bucket id is "combat" (FILTER_BUCKETS["combat"], _filter_state["combat"]); the test toggled a non-existent "military" key, so nothing was filtered and combat entries stayed visible. Use "combat". Clears test_chronicle_coverage (721 passing / 6 failing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2d15605230
commit
774ffe9620
1 changed files with 4 additions and 4 deletions
|
|
@ -133,8 +133,8 @@ func test_filter_hides_entries_by_category() -> void:
|
|||
# 3 entries total (all pass filter by default).
|
||||
assert_eq(panel.get_visible_entries().size(), panel.get_entry_count(),
|
||||
"default filter state shows everything")
|
||||
# Turn off "military" (combat) — none emitted, count unchanged.
|
||||
panel._filter_state["military"] = false
|
||||
# Turn off "combat" — none emitted, count unchanged.
|
||||
panel._filter_state["combat"] = false
|
||||
assert_eq(panel.get_visible_entries().size(), panel.get_entry_count(),
|
||||
"filtering combat when there's no combat leaves all entries visible")
|
||||
# Turn off "city" — founding + economy entries hidden.
|
||||
|
|
@ -155,11 +155,11 @@ func test_combat_filter_hides_combat_only() -> void:
|
|||
panel._is_processing = false
|
||||
var initial_count: int = panel.get_entry_count()
|
||||
assert_gte(initial_count, 3, "expected at least 3 entries")
|
||||
panel._filter_state["military"] = false
|
||||
panel._filter_state["combat"] = false
|
||||
var visible: Array = panel.get_visible_entries()
|
||||
for entry: Dictionary in visible:
|
||||
assert_ne(entry.get("category"), "combat",
|
||||
"no combat entries should pass when military filter is off")
|
||||
"no combat entries should pass when combat filter is off")
|
||||
assert_lt(visible.size(), initial_count,
|
||||
"hiding military must reduce visible entry count")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue