fix(client): sprint 37 test-pass fixes — parse error + test hygiene
- character_creation.gd:1614: type-annotate dir_name to fix GDScript inference parse error. CARDINAL_DIRS is an untyped const Array, so `var dir_name := CARDINAL_DIRS[idx]` failed type inference and blocked test_character_creation_sprint28.gd test discovery. Runtime was lenient but gdUnit4's scanner is strict. - test_merge_path_flows_sprint37.gd (_load_char_create): call add_child before _update_start_btn_state so @onready vars (_footer_start) are bound when the helper dereferences them. Unblocks 2 merge-path tests. - test_anti_tedium.gd (test_bug_report_sends_unpause_on_close): call dialog.close() instead of the old dialog._close() rename casualty. `on_close()` is a lifecycle hook — it doesn't actually transition state; `close()` is what MetaScreen exposes. - test_anti_tedium.gd (before_test): clear MetaStack._stack. Prior tests leave stale freed dialog refs on the stack; _any_pausing() iterates the stack during close() and crashes with "previously freed". Net: sprint-37 test files (test_merge_path_flows_sprint37.gd, test_anti_tedium.gd) now pass. Overall suite: 2428/2488 passing (60 remaining failures are pre-existing, unrelated to sprint 37). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1611,7 +1611,7 @@ func _take_screenshot(suffix: String = "") -> void:
|
||||
# Take screenshot for current cardinal, then advance. Single array for
|
||||
# both facing and filename label — previously two arrays with different
|
||||
# orderings produced swapped labels at indices 1 and 3.
|
||||
var dir_name := CARDINAL_DIRS[_screenshot_cardinal_idx]
|
||||
var dir_name: String = CARDINAL_DIRS[_screenshot_cardinal_idx]
|
||||
_char_visual.set_facing(dir_name)
|
||||
suffix = dir_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user