extends GutTest const GameScene = preload("res://scenes/Game.tscn") func test_hud_shows_exact_chest_prompt_only_while_the_chest_is_a_context_target() -> void: var game := GameScene.instantiate() as Game add_child_autofree(game) await get_tree().process_frame var state := game.get_game_state() var hud := game.get_node("HUD") as GameHud var chest := state.player.cell + Vector2i.UP state.map.set_cell(chest, GridMapState.CellKind.CHEST) hud.refresh(state) assert_eq(hud.get_context_prompt(), "Espace — Ouvrir le coffre") state.map.set_cell(chest, GridMapState.CellKind.FLOOR) hud.refresh(state) assert_eq(hud.get_context_prompt(), "")