test(ui): named default-visibility pins for nature overlays (PR #195 Hoshe finding)
RVR-on-by-default is the single most player-visible behavior wave 1 ships (rivers appear with no toggle hunt) and was only exercised by live captures; gen_basins' default was pinned incidentally inside the toggle-redraw spy test and gen_attractors not at all. One named test now asserts all three fresh-construction defaults per Araminta's ruling (RVR on, BAS off, ATR off). Revert-verified: flipping the gen_rivers init line fails exactly this test by name (1 failure total in the 78-test suite). Suite 78/78; gdlint clean. Tickets: T-1156 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,29 @@ func test_set_overlay_visible_unknown_id_is_a_noop() -> void:
|
||||
assert_bool(v.is_overlay_visible("not_a_real_overlay")).is_false()
|
||||
|
||||
|
||||
## PR #195 review (Hoshe): named default-visibility pins for the T-1156
|
||||
## nature overlays at fresh-viewer construction, per Araminta's ruling —
|
||||
## RVR ON (rivers are load-bearing geography, a first-time Atlas viewer sees
|
||||
## them without hunting for a toggle: the single most player-visible behavior
|
||||
## the feature ships), BAS and ATR OFF (secondary/dev-facing analytical
|
||||
## layers, opt-in). Without these, a refactor of the _ready() visibility-init
|
||||
## loop could silently flip the defaults and only a live capture would
|
||||
## notice — gen_basins was previously covered only incidentally by the
|
||||
## toggle-redraw spy test above.
|
||||
func test_nature_overlay_defaults_rivers_on_basins_and_attractors_off() -> void:
|
||||
var v: AtlasWindowViewer = auto_free(AtlasWindowViewer.new())
|
||||
add_child(v)
|
||||
assert_bool(v.is_overlay_visible("gen_rivers")).override_failure_message(
|
||||
"gen_rivers must default ON (Araminta's RVR-on ruling, T-1156 wave 1)"
|
||||
).is_true()
|
||||
assert_bool(v.is_overlay_visible("gen_basins")).override_failure_message(
|
||||
"gen_basins must default OFF (opt-in analytical layer)"
|
||||
).is_false()
|
||||
assert_bool(v.is_overlay_visible("gen_attractors")).override_failure_message(
|
||||
"gen_attractors must default OFF (dev-facing detail, opt-in)"
|
||||
).is_false()
|
||||
|
||||
|
||||
## Counts real _draw() invocations on AtlasWindowNatureOverlay — CanvasItem
|
||||
## exposes no public "is a redraw pending" query in this Godot version
|
||||
## (confirmed directly: is_queued_for_redraw() does not exist on Node2D here
|
||||
|
||||
Reference in New Issue
Block a user