Simplify question toolbar branding
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
extends SceneTree
|
||||
|
||||
const Brand := preload("res://scripts/ui/medmind_style.gd")
|
||||
|
||||
var failures := 0
|
||||
|
||||
|
||||
@@ -338,6 +340,18 @@ func _test_player_runtime_construction() -> void:
|
||||
await process_frame
|
||||
_assert(player.question_card != null, "question player should construct its branded card")
|
||||
_assert(player.navigator_popup != null, "question player should construct its popup navigator")
|
||||
_assert(player.header_row.get_node_or_null("StepBadge") == null, "question player should not display a redundant STEP 3 badge")
|
||||
_assert(player.header_row.get_child(0) == player.progress_button, "question progress should be the first header item")
|
||||
_assert(player.clear_highlight_button.icon != null, "clear highlights should use the supplied toolbar artwork")
|
||||
_assert(player.report_button.icon != null, "report question should use the supplied toolbar artwork")
|
||||
player._style_asset_toolbar_button(player.clear_highlight_button, player.CLEAR_HIGHLIGHT_LIGHT_ICON)
|
||||
_assert(player.clear_highlight_button.icon == player.CLEAR_HIGHLIGHT_LIGHT_ICON, "clear highlights should support its light-mode artwork")
|
||||
player._style_asset_toolbar_button(player.report_button, player.REPORT_QUESTION_LIGHT_ICON)
|
||||
_assert(player.report_button.icon == player.REPORT_QUESTION_LIGHT_ICON, "report question should support its light-mode artwork")
|
||||
var toggle_box := player.theme_button.get_theme_stylebox("normal") as StyleBoxFlat
|
||||
_assert(player.theme_button.custom_minimum_size == Vector2(44, 44), "question theme toggle should retain the shared square footprint")
|
||||
_assert(toggle_box != null and toggle_box.corner_radius_top_left == 22, "question theme toggle should use the shared circular treatment")
|
||||
_assert(player.theme_button.icon in [Brand.SUN_ICON, Brand.MOON_ICON], "question theme toggle should use the shared sun or moon icon")
|
||||
_assert(player.choice_badges.size() == 5, "question player should construct an answer badge for every visible choice slot")
|
||||
_assert(player.choice_followup_panels[2].get_parent() == player.choice_rows[2], "distractor remediation should remain nested inside its answer choice")
|
||||
player.choice_followup_panels[2].visible = true
|
||||
|
||||
Reference in New Issue
Block a user