feat(client): ConsideringIndicator — rotates think-lines on a Timer

This commit is contained in:
2026-07-10 15:06:31 -05:00
parent 6bd5e4f84a
commit 82b2de19bb
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
extends "res://addons/gut/test.gd"
const ConsideringIndicator = preload("res://scripts/ui/considering_indicator.gd")
const ConsideringPhrases = preload("res://scripts/ui/considering_phrases.gd")
func test_start_shows_first_phrase_and_stop_clears():
# Point phrases at a missing file so next() is deterministically LAST_RESORT.
var phrases = ConsideringPhrases.new("res://content/does_not_exist.json")
var ind = ConsideringIndicator.new(phrases)
add_child_autofree(ind) # _ready() creates the Timer child
var label := Label.new()
add_child_autofree(label)
ind.start(label)
assert_eq(label.text, ConsideringPhrases.LAST_RESORT) # first phrase shown at once
ind.stop()
assert_eq(label.text, "") # cleared on stop