Add visual harmonization tests for editor UI components and ground finish chooser
- Implemented `test_editor_visual_harmonization.gd` to validate the Stickman editor and prop editor UI layouts, ensuring proper functionality and visual consistency. - Created `test_editor_visual_theme.gd` to verify the loading and application of visual themes in the editor, including semantic overrides and default values. - Introduced `test_phase19_ground_finish_chooser.gd` to test the ground finish chooser's functionality, including layout responsiveness, selection behavior, and interaction with the stage. - Added new scripts for ground finish preview and chooser UI components to enhance the editor's visual representation of ground finishes.
This commit is contained in:
@@ -20,8 +20,9 @@ func _check(label: String, value: bool) -> void:
|
||||
push_error("FAIL: %s" % label)
|
||||
|
||||
func _run() -> void:
|
||||
root.size = Vector2i(1200, 800)
|
||||
var theme := THEME.new()
|
||||
_check("default inspector background is #262C39", theme.inspector_background_color() == Color("#262C39"))
|
||||
_check("default inspector background uses shared surface token", theme.inspector_background_color().is_equal_approx(Color("#252B38FA")))
|
||||
var preview := PREVIEW_SCENE.instantiate() as Control
|
||||
root.add_child(preview)
|
||||
await process_frame
|
||||
@@ -39,7 +40,6 @@ func _run() -> void:
|
||||
_check("front pose stops gait", int(preview.get("_motion")) == 0 and bool(preview.get("_walk_paused")))
|
||||
preview.queue_free()
|
||||
var editor := CANVAS_SCENE.instantiate() as Control
|
||||
editor.size = Vector2(1200.0, 800.0)
|
||||
root.add_child(editor)
|
||||
await process_frame
|
||||
var canvas := editor.get("_canvas") as PropCanvas
|
||||
@@ -95,12 +95,12 @@ func _run() -> void:
|
||||
var eye_data: Dictionary = PROP_FILE.load("res://content/props/eye.prop")
|
||||
_check("eye prop fixture is available", not eye_data.is_empty())
|
||||
editor.call("_apply_json_data", eye_data)
|
||||
editor.size = Vector2(1200.0, 600.0)
|
||||
root.size = Vector2i(1200, 600)
|
||||
canvas.set_edit_mode(PropCanvas.EditMode.ATTACH)
|
||||
await process_frame
|
||||
await process_frame
|
||||
var top_bar := editor.get_node("TopBar") as Control
|
||||
var status_bar := editor.get_node("StatusBar") as Control
|
||||
var top_bar := editor.get_node("ChromeRoot/TopBar") as Control
|
||||
var status_bar := editor.get_node("ChromeRoot/StatusBar") as Control
|
||||
var holding_preview := editor.get("_attach_preview") as Control
|
||||
_check("Attach layout stays between name and status bars", main_split.get_global_rect().position.y >= top_bar.get_global_rect().end.y - 1.0 and holding_preview.get_global_rect().end.y <= status_bar.get_global_rect().position.y + 1.0)
|
||||
var preview_container := holding_preview.get("_viewport_container") as SubViewportContainer
|
||||
|
||||
Reference in New Issue
Block a user