Save The Tree implementation and acceptance work in progress
Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
extends SceneTree
|
||||
const FixtureCleanup := preload("res://tests/helpers/ui_audio_fixture_cleanup.gd")
|
||||
|
||||
## Real Runtime commands through the staff panel controls, including queued
|
||||
## assignment, draft preservation, a rejected role, and pending Save restoration.
|
||||
@@ -268,7 +269,11 @@ func _test_navigation_and_layout() -> void:
|
||||
|
||||
|
||||
func _test_restored_opening_does_not_pause() -> void:
|
||||
_main.queue_free()
|
||||
var _audio_cleanup_transition: Dictionary = await _cleanup_fixture_owner(_main, "restored-transition")
|
||||
if not bool(_audio_cleanup_transition.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_transition))
|
||||
quit(96)
|
||||
return
|
||||
await process_frame
|
||||
_clock.reset(1, 6, 0)
|
||||
var state: Variant = root.get_node("GameState")
|
||||
@@ -320,7 +325,11 @@ func _finish() -> void:
|
||||
if not _save_path.is_empty():
|
||||
SaveService.delete_save(_save_path)
|
||||
if is_instance_valid(_main):
|
||||
_main.queue_free()
|
||||
var _audio_cleanup_final: Dictionary = await _cleanup_fixture_owner(_main, "finish")
|
||||
if not bool(_audio_cleanup_final.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_final))
|
||||
quit(96)
|
||||
return
|
||||
print("Staff management UI: %d checks, %d failures" % [_checks, _failures])
|
||||
quit(1 if _failures > 0 else 0)
|
||||
|
||||
@@ -378,6 +387,8 @@ func _test_drag_assignment() -> void:
|
||||
|
||||
|
||||
func _drag_staff_to(target: Vector2, cell: Variant = null, before_release := Callable()) -> void:
|
||||
# Let restored roster layout finish before reading the card to press.
|
||||
await process_frame
|
||||
var source: Button = _panel.roster_buttons[&"staff_akane"]
|
||||
var start := source.get_global_rect().get_center()
|
||||
var motion := InputEventMouseMotion.new()
|
||||
@@ -600,3 +611,18 @@ func _test_drag_defense_lock(register_objective := true) -> void:
|
||||
SaveService.delete_save(path)
|
||||
_expect(_runtime.restore_snapshot(before), "restore fixture after defense boundary")
|
||||
_panel.refresh()
|
||||
|
||||
|
||||
## QA-only control proof routing for sequential ordinary Main owners.
|
||||
## The old02cd/6be99 helpers and original Clock/Runtime values stay exact.
|
||||
func _cleanup_fixture_owner(owner: Node, phase: String) -> Dictionary:
|
||||
var original_control: String = OS.get_environment("THE_TREE_AUDIO_FIXTURE_CONTROL_PROOF")
|
||||
if original_control.is_empty() or not original_control.is_absolute_path():
|
||||
return {&"passed": false, &"reason": "fresh absolute owned control proof required"}
|
||||
var phase_control: String = original_control.get_basename() + "-" + phase + ".json"
|
||||
if FileAccess.file_exists(phase_control):
|
||||
return {&"passed": false, &"reason": "ordinary owner control proof overwrite forbidden"}
|
||||
OS.set_environment("THE_TREE_AUDIO_FIXTURE_CONTROL_PROOF", phase_control)
|
||||
var report: Dictionary = await FixtureCleanup.free_owner_and_wait(self, owner)
|
||||
OS.set_environment("THE_TREE_AUDIO_FIXTURE_CONTROL_PROOF", original_control)
|
||||
return report
|
||||
|
||||
Reference in New Issue
Block a user