test(game-engine): ✅ Add consistent ThemeVocabulary initialization in credits screen tests for headless environments
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
425d4ebafe
commit
8e23aeca66
1 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,13 @@ const CreditsScript: GDScript = preload("res://engine/scenes/menus/credits.gd")
|
|||
const CREDITS_PATH: String = "res://public/games/age-of-dwarves/data/credits.json"
|
||||
|
||||
|
||||
func before_all() -> void:
|
||||
# ThemeVocabulary is an autoload; in headless GUT the theme is never
|
||||
# loaded by anyone else, so has_key/lookup return defaults until we
|
||||
# call this. Mirrors what main_menu.gd does at runtime.
|
||||
ThemeVocabulary.load_vocabulary("age-of-dwarves")
|
||||
|
||||
|
||||
func test_credits_json_exists_and_is_valid() -> void:
|
||||
assert_true(FileAccess.file_exists(CREDITS_PATH),
|
||||
"credits.json must live at the canonical game-pack path")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue