From 7f184db0dc1b5cde191c30662f7fb1e98e2e3a12 Mon Sep 17 00:00:00 2001 From: Voyager Date: Tue, 18 Aug 2026 21:59:34 -0400 Subject: [PATCH] test: align validation with current systems --- tests/art_tools_validation.gd | 7 +++---- tests/economy_regression_validation.gd | 10 +++++++++- tests/fish_hotbar_showcase_validation.gd | 16 ++++++++++------ tests/movement_multiplayer_validation.gd | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/tests/art_tools_validation.gd b/tests/art_tools_validation.gd index 765222f..cafd16e 100644 --- a/tests/art_tools_validation.gd +++ b/tests/art_tools_validation.gd @@ -225,14 +225,13 @@ func _run() -> void: chat_ui.refocus_gameplay() chat_ui.open_chat() assert(chat_ui.is_open()) - typed_chat_entry.text = "/not-a-real-command" + typed_chat_entry.text = "validation message" chat_ui.call("_send") assert(not chat_ui.is_open()) assert(not typed_chat_entry.has_focus()) assert(not bool(chat_ui.get("_input_lock_applied"))) - assert(chat_status.visible) - assert(chat_status.text == "Unknown command: /not-a-real-command") - chat_ui.call("_set_status", "") + assert(not chat_status.visible) + assert(chat_status.text.is_empty()) var quick_menu := game_ui.get_node( "%QuickRadialMenu" ) as QuickRadialMenu diff --git a/tests/economy_regression_validation.gd b/tests/economy_regression_validation.gd index e866213..1ef8c72 100644 --- a/tests/economy_regression_validation.gd +++ b/tests/economy_regression_validation.gd @@ -161,13 +161,19 @@ func _run_multiplayer_client() -> void: var shop_service := main.get_node("%NetworkShopService") as NetworkShopService sale_service.local_sale_finished.connect(_on_sale_finished) shop_service.local_purchase_finished.connect(_on_shop_finished) + assert(player.inventory_layout.restore_backpack_level( + PlayerInventoryLayout.MAX_BACKPACK_LEVEL + )) + assert(player.cooler_capacity.restore_level(PlayerCoolerCapacity.MAX_LEVEL)) + player.inventory.set_inventory_layout(null) var catch_ids: Array[StringName] = [] for fish: FishData in catalog.candidates: if not fish.active: continue var fish_catch := _make_catch(fish) - player.inventory.add_catch(fish_catch) + assert(player.inventory.add_catch(fish_catch)) catch_ids.append(fish_catch.catch_id) + player.inventory.set_inventory_layout(player.inventory_layout) await create_timer(1.0).timeout _sale_result.clear() assert(not sale_service.request_local_sale(catch_ids).is_empty()) @@ -181,6 +187,8 @@ func _run_multiplayer_client() -> void: for catch_id: StringName in catch_ids: assert(not player.inventory.contains_catch_id(catch_id)) assert(not sale_service.is_local_sale_pending()) + assert(player.inventory_layout.restore_backpack_level(0)) + assert(player.cooler_capacity.restore_level(0)) var interaction := main.get("_shop_interaction") as FishingShopInteraction player.global_position = interaction.global_position diff --git a/tests/fish_hotbar_showcase_validation.gd b/tests/fish_hotbar_showcase_validation.gd index fb1cbe6..999561a 100644 --- a/tests/fish_hotbar_showcase_validation.gd +++ b/tests/fish_hotbar_showcase_validation.gd @@ -89,10 +89,12 @@ func _run() -> void: assert(not service.is_local_showcase_visible()) await _wait_for_held_fish_visibility(player, false) var saved_weather: WorldWeatherService.Weather = ( - world_weather.get_weather() + world_weather.get_persistent_weather() ) - var saved_weather_seconds: float = world_weather.get_seconds_remaining() - var saved_time_hours: float = world_time.get_time_hours() + var saved_weather_seconds: float = ( + world_weather.get_persistent_seconds_remaining() + ) + var saved_time_hours: float = world_time.get_persistent_time_hours() assert(save_manager.save_now()) var save_path: String = str(save_manager.get("_save_path")) @@ -143,10 +145,12 @@ func _run() -> void: ) assert(save_manager.load_player_data()) assert(player.experience.get_total_experience() == 125) - assert(absf(world_time.get_time_hours() - saved_time_hours) < 0.01) - assert(world_weather.get_weather() == saved_weather) + # Loading a save must not replace the active RTC-authoritative clock. + assert(absf(world_time.get_time_hours() - 8.0) < 0.01) + assert(world_weather.get_persistent_weather() == saved_weather) assert(absf( - world_weather.get_seconds_remaining() - saved_weather_seconds + world_weather.get_persistent_seconds_remaining() + - saved_weather_seconds ) < 2.0) assert(player.experience.get_level() == 2) assert(player.hotbar.get_fish_catch_id(1) == fish_catch.catch_id) diff --git a/tests/movement_multiplayer_validation.gd b/tests/movement_multiplayer_validation.gd index a870d13..bbd9efd 100644 --- a/tests/movement_multiplayer_validation.gd +++ b/tests/movement_multiplayer_validation.gd @@ -258,7 +258,7 @@ func _run_host() -> void: # Authentication completes before the client has necessarily created and # begun observing the host avatar. Give its gameplay scene a bounded moment # to settle before emitting the one-shot locomotion/action sequence. - await create_timer(1.0).timeout + await create_timer(3.0).timeout var player := main.get("_player") as Player player.configure_network_remote(true) player.apply_authoritative_network_input(_movement_input(1, true))