NEO-142: clear GDScript linter warnings in faction HUD work

Hoist quest progress label lines binding; drop redundant await on synchronous
GdUnit assert_signal calls.
pull/182/head
VinPropane 2026-06-17 21:12:54 -04:00
parent be7878a199
commit f8a36213a1
3 changed files with 31 additions and 33 deletions

View File

@ -364,16 +364,14 @@ func _render_progress_label() -> void:
if not is_instance_valid(_progress_label): if not is_instance_valid(_progress_label):
return return
var header := "Quests:" var header := "Quests:"
if _last_snapshot.is_empty():
var lines: PackedStringArray = [header] var lines: PackedStringArray = [header]
if _last_snapshot.is_empty():
if not _progress_error.is_empty(): if not _progress_error.is_empty():
lines.append("error — %s" % _progress_error) lines.append("error — %s" % _progress_error)
if not _defs_error.is_empty(): if not _defs_error.is_empty():
lines.append("definitions error — %s" % _defs_error) lines.append("definitions error — %s" % _defs_error)
lines.append("Loading…") lines.append("Loading…")
_progress_label.text = "\n".join(lines) else:
return
var lines: PackedStringArray = [header]
if not _progress_error.is_empty(): if not _progress_error.is_empty():
lines.append("sync error — %s" % _progress_error) lines.append("sync error — %s" % _progress_error)
if not _defs_error.is_empty(): if not _defs_error.is_empty():

View File

@ -149,7 +149,7 @@ func test_request_sync_emits_faction_standing_received() -> void:
# Act # Act
c.call("request_sync_from_server") c.call("request_sync_from_server")
# Assert # Assert
await assert_signal(c).is_emitted("faction_standing_received", any()) assert_signal(c).is_emitted("faction_standing_received", any())
assert_that(_standing_capture.has("factions")).is_true() assert_that(_standing_capture.has("factions")).is_true()
assert_that(transport.last_url).contains("/faction-standing") assert_that(transport.last_url).contains("/faction-standing")
@ -163,7 +163,7 @@ func test_http_404_emits_faction_standing_sync_failed() -> void:
# Act # Act
c.call("request_sync_from_server") c.call("request_sync_from_server")
# Assert # Assert
await assert_signal(c).is_emitted( assert_signal(c).is_emitted(
"faction_standing_sync_failed", "HTTP 404 (player unknown)" "faction_standing_sync_failed", "HTTP 404 (player unknown)"
) )

View File

@ -327,7 +327,7 @@ func test_completion_transition_emits_economy_refresh_signal() -> void:
controller.call("_on_progress_received", _active_gather_snapshot()) controller.call("_on_progress_received", _active_gather_snapshot())
controller.call("_on_progress_received", _completed_gather_with_summary_snapshot()) controller.call("_on_progress_received", _completed_gather_with_summary_snapshot())
# Assert # Assert
await assert_signal(controller).is_emitted("quest_completion_reward_transition", any(), any()) assert_signal(controller).is_emitted("quest_completion_reward_transition", any(), any())
func test_completion_transition_invokes_economy_refresh_callback() -> void: func test_completion_transition_invokes_economy_refresh_callback() -> void:
@ -360,9 +360,9 @@ func test_boot_completed_does_not_emit_economy_refresh_signal() -> void:
# Act # Act
controller.call("_on_progress_received", _completed_gather_with_summary_snapshot()) controller.call("_on_progress_received", _completed_gather_with_summary_snapshot())
# Assert # Assert
await (assert_signal(controller).wait_until(200).is_not_emitted( assert_signal(controller).wait_until(200).is_not_emitted(
"quest_completion_reward_transition" "quest_completion_reward_transition"
)) )
func test_completion_transition_queues_economy_refresh_while_clients_busy() -> void: func test_completion_transition_queues_economy_refresh_while_clients_busy() -> void: