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:
@@ -58,8 +58,9 @@ func _test_v15_migration() -> void:
|
||||
]
|
||||
}
|
||||
var migrated: Dictionary = STAGE_SCENE_IO._migrate_to_current(source)
|
||||
_expect(String(migrated.get("version", "")) == "1.6", "v1.5 scenes migrate to v1.6")
|
||||
_expect(String(migrated.get("version", "")) == "1.7", "v1.5 scenes migrate to v1.7")
|
||||
_expect(String(migrated.get("sky_id", "")) == "sky_cloudy_day", "v1.5 migration preserves the saved Sky")
|
||||
_expect(String(migrated.get("background_kind", "")) == "sky" and String(migrated.get("plain_color", "")) == STAGE_SCENE_IO.DEFAULT_PLAIN_COLOR, "v1.5 migration adds the remembered Plain Background defaults")
|
||||
var objects: Array = migrated.get("objects", []) as Array
|
||||
_expect(String((objects[0] as Dictionary).get("finish_id", "")) == "finish_ground_sidewalk", "v1.5 migration preserves walkable terrain finishes")
|
||||
var migrated_brick_color: String = String((objects[1] as Dictionary).get("color", "")).to_upper()
|
||||
@@ -157,7 +158,7 @@ func _test_background_ground_model_and_serialization(world: Node2D, surface: Sta
|
||||
_expect(selection.hit_test(surface.global_position) == surface, "Edit Scenery hit-testing can select background ground")
|
||||
var data: Dictionary = _stage.call("_collect_scene_data", false)
|
||||
var validation: Dictionary = STAGE_SCENE_IO._validate_root(data)
|
||||
_expect(String(data.get("version", "")) == "1.6" and bool(validation.get("ok", false)), "background ground serializes and validates in the current scene schema")
|
||||
_expect(String(data.get("version", "")) == STAGE_SCENE_IO.FILE_VERSION and bool(validation.get("ok", false)), "background ground serializes and validates in the current scene schema")
|
||||
var found: Dictionary = {}
|
||||
for entry_value: Variant in data.get("objects", []):
|
||||
if entry_value is Dictionary and String((entry_value as Dictionary).get("type", "")) == "background_ground":
|
||||
|
||||
Reference in New Issue
Block a user