Stabilize runtime validation under dynamic UI load
This commit is contained in:
parent
983e4d0ec3
commit
d2dce7f900
5 changed files with 46 additions and 11 deletions
|
|
@ -31,9 +31,14 @@ func _run() -> void:
|
|||
for _frame: int in 8:
|
||||
await process_frame
|
||||
assert(bool(main.get("_application_initialized")))
|
||||
var session := main.get_node("%NetworkSession") as NetworkSession
|
||||
assert(bool(main.call(
|
||||
"_apply_world", WorldLayout.STARTER_ISLAND, 1, true
|
||||
)))
|
||||
assert(session.set_host_world(WorldLayout.STARTER_ISLAND, 1))
|
||||
assert(bool(main.call("_prepare_private_host")))
|
||||
var save_manager := main.get("_save_manager") as PlayerSaveManager
|
||||
assert(save_manager.initialize_new_game())
|
||||
assert(save_manager.initialize_new_game(1, WorldLayout.STARTER_ISLAND))
|
||||
main.call("_enter_gameplay")
|
||||
for _frame: int in 8:
|
||||
await process_frame
|
||||
|
|
@ -42,7 +47,6 @@ func _run() -> void:
|
|||
var catalog := main.get("fish_catalog") as FishPool
|
||||
var sale_service := main.get_node("%NetworkSaleService") as NetworkSaleService
|
||||
var shop_service := main.get_node("%NetworkShopService") as NetworkShopService
|
||||
var session := main.get_node("%NetworkSession") as NetworkSession
|
||||
var reservations := (
|
||||
main.get_node("%PlayerAssetReservationService")
|
||||
as PlayerAssetReservationService
|
||||
|
|
@ -554,7 +558,10 @@ func _test_host_backpack_purchase(
|
|||
for expected_capacity: int in [18, 27, 36]:
|
||||
_shop_result.clear()
|
||||
assert(not shop_service.request_backpack_capacity_upgrade().is_empty())
|
||||
assert(not _shop_result.is_empty() and bool(_shop_result[1]))
|
||||
assert(
|
||||
not _shop_result.is_empty() and bool(_shop_result[1]),
|
||||
"Backpack purchase failed: %s" % [_shop_result],
|
||||
)
|
||||
assert(layout.get_inventory_capacity() == expected_capacity)
|
||||
assert(player.wallet.get_balance() == balance_before - total_cost)
|
||||
assert(layout.get_next_backpack_cost() == -1)
|
||||
|
|
@ -575,7 +582,10 @@ func _test_host_storage_purchase(
|
|||
for expected_capacity: int in [18, 27, 36, 45, 54, 63, 72]:
|
||||
_shop_result.clear()
|
||||
assert(not shop_service.request_cooler_capacity_upgrade().is_empty())
|
||||
assert(not _shop_result.is_empty() and bool(_shop_result[1]))
|
||||
assert(
|
||||
not _shop_result.is_empty() and bool(_shop_result[1]),
|
||||
"Cooler purchase failed: %s" % [_shop_result],
|
||||
)
|
||||
assert(capacity.get_capacity() == expected_capacity)
|
||||
assert(player.wallet.get_balance() == balance_before - total_cost)
|
||||
assert(capacity.get_next_cost() == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue