fix: show only actionable HUD status information
This commit is contained in:
@@ -19,10 +19,13 @@ func test_combat_routes_damage_feedback_and_exposes_current_target_summary() ->
|
||||
var enemy_view := game.get_node("World/Enemies/Goblin") as ActorView
|
||||
hud.refresh(state, [], game.get_run_state())
|
||||
|
||||
assert_string_contains(hud.combat_summary, "Gobelin")
|
||||
assert_string_contains(hud.combat_summary, "PV")
|
||||
assert_eq(hud.combat_summary.find("Target"), -1)
|
||||
assert_eq(hud.combat_summary.find("HP"), -1)
|
||||
assert_eq(hud.combat_summary, "Gobelin — PV : 6/6")
|
||||
assert_true((hud.get_node("EnemyHealthLabel") as Label).visible)
|
||||
assert_eq((hud.get_node("EnemyHealthLabel") as Label).text, "Gobelin — PV : 6/6")
|
||||
for label_name: String in ["CharacterStatusLabel", "SpellLabel", "CombatSummaryLabel", "DeadlineLabel"]:
|
||||
var label := hud.get_node(label_name) as Label
|
||||
assert_false(label.visible, "%s must stay hidden while only the target is actionable" % label_name)
|
||||
assert_eq(label.text, "")
|
||||
game.submit_test_action(Vector2i.RIGHT)
|
||||
await _wait_for_feedback()
|
||||
assert_eq(player_view.last_damage, 2)
|
||||
@@ -36,9 +39,10 @@ func test_combat_routes_damage_feedback_and_exposes_current_target_summary() ->
|
||||
game.submit_test_action(Vector2i.RIGHT)
|
||||
await _wait_for_feedback()
|
||||
assert_false(is_instance_valid(enemy_view))
|
||||
assert_eq(hud.combat_summary, "Aucune cible active")
|
||||
assert_eq(hud.get_node("EnemyHealthLabel").text, "Aucune cible active")
|
||||
assert_eq(_visible_text_occurrences(hud, "Aucune cible active"), 1, "The no-target state must have one visible string, never a duplicate")
|
||||
assert_eq(hud.combat_summary, "")
|
||||
assert_eq((hud.get_node("EnemyHealthLabel") as Label).text, "")
|
||||
assert_false((hud.get_node("EnemyHealthLabel") as Label).visible)
|
||||
assert_eq(_visible_text_occurrences(hud, "Aucune cible active"), 0, "The no-target state must never expose a no-target placeholder")
|
||||
assert_eq(_visible_text_occurrences(hud, "No active target"), 0, "The no-target state must never expose the English fallback")
|
||||
assert_string_contains(hud.event_log.get_parsed_text(), "Vous frappez le gobelin avec mains nues")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user