Add StageBackgroundView and related tests for plain background functionality
- Implemented StageBackgroundView class for managing sky and plain backgrounds in the stage. - Added functionality to set background type and color, bind camera, and apply themes. - Created test_phase19_plain_background.gd to validate plain background behavior and migration. - Developed test_phase19_starter_chooser_layout.gd to ensure proper layout and functionality of the starter chooser. - Included visual capture tests for UI elements and interactions.
This commit is contained in:
@@ -46,7 +46,7 @@ func _test_migration_and_schema() -> void:
|
||||
var legacy: Dictionary = {"version": version, "objects": [{"file_id": "prop_a", "type": "prop"}]}
|
||||
var migrated: Dictionary = STAGE_SCENE_IO._migrate_to_current(legacy)
|
||||
var entry: Dictionary = migrated["objects"][0]
|
||||
_expect(String(migrated["version"]) == "1.3" and entry.get("use_spots") == [] and int(entry.get("next_use_spot_number", 0)) == 1, "%s prop receives v1.3 empty Use spot defaults" % version)
|
||||
_expect(String(migrated["version"]) == STAGE_SCENE_IO.FILE_VERSION and entry.get("use_spots") == [] and int(entry.get("next_use_spot_number", 0)) == 1, "%s prop receives current-format empty Use spot defaults" % version)
|
||||
var valid_root: Dictionary = _valid_root()
|
||||
_expect(bool(STAGE_SCENE_IO._validate_root(valid_root).get("ok", false)), "valid Use spot data passes root validation")
|
||||
var duplicate: Dictionary = _valid_root()
|
||||
@@ -176,7 +176,10 @@ func _on_use_failed(reason_code: String, _prop: PropBlock, _spot_id: String) ->
|
||||
|
||||
func _valid_root() -> Dictionary:
|
||||
return {
|
||||
"version": "1.3",
|
||||
"version": STAGE_SCENE_IO.FILE_VERSION,
|
||||
"sky_id": "sky_neutral",
|
||||
"background_kind": "sky",
|
||||
"plain_color": STAGE_SCENE_IO.DEFAULT_PLAIN_COLOR,
|
||||
"objects": [{
|
||||
"file_id": "prop_file",
|
||||
"type": "prop",
|
||||
|
||||
Reference in New Issue
Block a user