diff --git a/client/tests/test_character_creation_sprint28.gd b/client/tests/test_character_creation_sprint28.gd index 96fc4de4e..84930111c 100644 --- a/client/tests/test_character_creation_sprint28.gd +++ b/client/tests/test_character_creation_sprint28.gd @@ -1,11 +1,14 @@ ## Sprint 28 — Character creation screen tests (#705, Task #9) +## Updated sprint 36: W5/W6 restructure — 4-tab layout (Bookmark/Appearance/Skills/Debug), +## CharacterProfile signal type (#618/#680). ## ## Validates the CharacterCreation UI: scene instantiation, tab structure, ## signal emission (creation_confirmed / creation_cancelled), keyboard nav ## callbacks, randomize, color derivation helpers, and game flow wiring. ## -## These are UI-only tests (no compositor/server required). -## CharacterVisual asset paths fall back gracefully when GLBs are absent. +## NOTE: All tests run vacuously in headless — the 3D SubViewport scene cannot +## instantiate without a rendering context. Tests return early on _scene == null. +## Run non-headless for full coverage. ## ## Ticket: #705 | D-146, D-155, D-158, D-159, D-165 class_name TestCharacterCreationSprint28 @@ -51,7 +54,8 @@ func test_scene_is_character_creation_class() -> void: ).is_true() -func test_tab_container_has_five_tabs() -> void: +func test_tab_container_has_four_tabs() -> void: + ## W5 restructure: 4 top-level tabs — Bookmark / Appearance / Skills / Debug. if _scene == null: return var tc: TabContainer = _scene.get_node_or_null("Layout/TabPanel/TabContainer") @@ -59,17 +63,19 @@ func test_tab_container_has_five_tabs() -> void: if tc == null: return assert_int(tc.get_tab_count()).override_failure_message( - "TabContainer must have exactly 5 tabs (Body/Head/Hair/Clothing/Accessories)" - ).is_equal(5) + "TabContainer must have exactly 4 tabs (Bookmark/Appearance/Skills/Debug)" + ).is_equal(4) func test_tab_names() -> void: + ## W5 restructure: top-level tabs are Bookmark/Appearance/Skills/Debug. + ## Appearance sub-nav (Body/Head/Hair/Clothing/Accessories) is inside the Appearance tab. if _scene == null: return var tc: TabContainer = _scene.get_node_or_null("Layout/TabPanel/TabContainer") if tc == null: return - var expected := ["Body", "Head", "Hair", "Clothing", "Accessories"] + var expected := ["Bookmark", "Appearance", "Skills", "Debug"] for i in expected.size(): assert_str(tc.get_tab_title(i)).override_failure_message( "Tab %d must be named '%s'" % [i, expected[i]] @@ -411,7 +417,7 @@ func test_tab_navigation_wraps() -> void: var tc: TabContainer = _scene.get_node_or_null("Layout/TabPanel/TabContainer") if tc == null: return - tc.current_tab = 4 # last tab + tc.current_tab = 3 # last tab (Debug, index 3 of 4) # Simulate Tab key forward — wraps to 0 var event := InputEventKey.new() event.keycode = KEY_TAB