A reusable implant-layer busy indicator (Araminta's spec): an animated bracket sweep `[ >>>>···· ]` with a caption, themed entirely via ImplantTheme. The Atlas shows it centered over the canvas while the Layer-1 proxy is Pending and hides it on Ready — so cache hits never flash it and serverless mode never shows it. Layer separation (per direction): ImplantPending belongs to the diegetic implant UI only. The global, non-diegetic UI layer must use its own busy indicator with its own visuals — sharing the sweep logic is fine, resting on this theme/these glyphs is not. Documented in the component header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
GDScript
34 lines
1.1 KiB
GDScript
## Tests for the Phase-4 generation overlays in the Atlas viewer (#960, D-225).
|
|
## Referencing AtlasViewer forces both it and AtlasMarkerOverlay to compile, so
|
|
## this also guards against parse errors in the overlay rendering code.
|
|
class_name TestAtlasOverlays
|
|
extends GdUnitTestSuite
|
|
|
|
|
|
func test_generation_overlays_registered() -> void:
|
|
var ids: Array = []
|
|
for d: Dictionary in AtlasViewer.OVERLAY_DEFS:
|
|
ids.append(d["id"])
|
|
assert_that(ids).contains(["gen_l1_rivers", "gen_l1_basins", "gen_l1_attractors"])
|
|
|
|
|
|
func test_generation_data_round_trips() -> void:
|
|
var v: AtlasViewer = auto_free(AtlasViewer.new())
|
|
assert_that(v.get_generation_layer1()).is_null()
|
|
var mock := {
|
|
"body_id": "GJ1c",
|
|
"river_network": {"river_cells": [], "confluences": [], "mouths": []},
|
|
"drainage_basins": [],
|
|
"attractors": [],
|
|
}
|
|
v.set_generation_layer1(mock)
|
|
assert_that(v.get_generation_layer1()).is_equal(mock)
|
|
|
|
|
|
func test_implant_pending_start_stop() -> void:
|
|
var p: ImplantPending = auto_free(ImplantPending.new())
|
|
p.start("GENERATING LAYER 1")
|
|
assert_bool(p.visible).is_true()
|
|
p.stop()
|
|
assert_bool(p.visible).is_false()
|