feat: complete playtest parity improvements

This commit is contained in:
goose
2026-10-08 19:06:19 -04:00
parent cce25a1908
commit eca098b4b9
139 changed files with 3001 additions and 982 deletions
+25
View File
@@ -0,0 +1,25 @@
extends GutTest
const GameScene = preload("res://scenes/Game.tscn")
func test_inventory_title_columns_and_footer_have_distinct_contained_layout_zones() -> void:
var game := GameScene.instantiate() as Game
add_child_autofree(game)
await get_tree().process_frame
var panel := game.get_node("HUD/InventoryPanel") as InventoryPanel
panel.present(game.get_run_state().inventory, game.get_run_state().equipment, game.get_run_state().identification)
await get_tree().process_frame
var title := panel.get_node("Layout/Title") as Control
var entries := panel.get_node("Layout/Columns/Entries") as Control
var details := panel.get_node("Layout/Columns/Details") as Control
var footer := panel.get_node("Layout/Footer") as Control
var panel_rect := panel.get_global_rect()
for control in [title, entries, details, footer]:
assert_true(panel_rect.encloses(control.get_global_rect()), "%s stays inside inventory panel" % control.name)
assert_false(title.get_global_rect().intersects(entries.get_global_rect()))
assert_false(title.get_global_rect().intersects(details.get_global_rect()))
assert_false(entries.get_global_rect().intersects(details.get_global_rect()))
assert_false(entries.get_global_rect().intersects(footer.get_global_rect()))
assert_false(details.get_global_rect().intersects(footer.get_global_rect()))
assert_string_contains((footer as Label).text, "I Fermer")