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")
|
||||
var checks := 0
|
||||
var failures := 0
|
||||
func _initialize() -> void: call_deferred("run")
|
||||
@@ -49,7 +50,12 @@ func run() -> void:
|
||||
expect(side.get_theme_stylebox("panel").bg_color==front and detail.get_theme_color("font_color")==front_text,"repeated toggles restore exact front palette")
|
||||
expect(guide.get_theme_stylebox("panel").bg_color == guide_front, "guide restores FRONT skin")
|
||||
expect(clock.paused and clock.absolute_minute==360,"skin changes never advance simulation")
|
||||
main.queue_free();await process_frame
|
||||
var _audio_cleanup_0: Dictionary = await _cleanup_fixture_owner(main, "front-owner")
|
||||
if not bool(_audio_cleanup_0.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_0))
|
||||
quit(96)
|
||||
return
|
||||
await process_frame
|
||||
state.active_layer=1
|
||||
main=load("res://scenes/main/main.tscn").instantiate()
|
||||
root.add_child(main)
|
||||
@@ -62,9 +68,29 @@ func run() -> void:
|
||||
expect(main.operating_ledger_panel.get("_cash_label").get_theme_color("font_color") == Color("d8eeea"), "ledger initialized before scene attachment honors saved BACK layer")
|
||||
main.front_button.pressed.emit()
|
||||
expect(side.get_theme_stylebox("panel").bg_color==front,"BACK startup still restores FRONT palette")
|
||||
main.queue_free();await process_frame
|
||||
var _audio_cleanup_1: Dictionary = await _cleanup_fixture_owner(main, "back-owner")
|
||||
if not bool(_audio_cleanup_1.get(&"passed", false)):
|
||||
push_error("Ordinary fixture audio cleanup failed: %s" % str(_audio_cleanup_1))
|
||||
quit(96)
|
||||
return
|
||||
await process_frame
|
||||
print("Layer skin: %d checks, %d failures" % [checks,failures]);quit(failures)
|
||||
func capture(label: String) -> void:
|
||||
if DisplayServer.get_name()=="headless":return
|
||||
await process_frame;await RenderingServer.frame_post_draw
|
||||
expect(root.get_texture().get_image().save_png(ProjectSettings.globalize_path("res://artifacts/facility-dimensions-2026-09-29/guide-skin-%s.png" % label))==OK,"capture "+label)
|
||||
|
||||
|
||||
## 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