Skip to content

fix: repair all checked-in tests for CI and add exit-code checks#195

Closed
itsmiso-ai wants to merge 5 commits into
mainfrom
saffron/issue-176-fix-tests
Closed

fix: repair all checked-in tests for CI and add exit-code checks#195
itsmiso-ai wants to merge 5 commits into
mainfrom
saffron/issue-176-fix-tests

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

Fixes #176

Repair all checked-in tests to run successfully in CI and enforce exit-code checks.

Changes

  • test_food_upkeep.gd: change extends TestSuiteextends SceneTree
    (TestSuite doesn't exist as a built-in or autoload; other tests use SceneTree)
  • test_resource_trends.gd: replace Globals.get_node() with get_node()
    (Globals is not declared in scope; SceneTree has get_node directly)
  • test_recruit_worker.gd: change preload() → load() for main.gd, add explicit type annotation for initial_count variable
  • test_worker_cap.gd: change preload() → load() for main.gd
    (preload fails at compile time when GameState autoload is not yet registered)
  • CI: add exit-code check for reservation tests step (was silently ignoring failures)

itsmiso-ai and others added 5 commits June 4, 2026 21:03
… row

Add three new HUD row labels (HudWorkerCap, HudFoodWarning, HudGoalLabel)
to the main scene, displaying:

- Worker count / cap (e.g. '1 / 3')
- Food/upkeep warning when food is low or starving (⚠ LOW FOOD, ⚠ STARVING)
- Active rotating goal name and progress (e.g. 'Goal: Wood (5/10)')

render_hud_row() is called from render_all() alongside existing render_* functions.
Food warning only shown when relevant (low/starving). Goal progress hidden when
no active goal or when complete.
Add EventDrawerLabel, EventDrawerPanel, EventDrawerMargin, and
EventDrawerLog nodes that are referenced by @onready vars in
scripts/main.gd but were missing from the scene file.

Without these nodes, Godot crashes at scene load with:
'Nonexistent function 'visible' in base 'null instance''

Fixes #139
Fixes #176

- test_food_upkeep.gd: change extends TestSuite → extends SceneTree
  (TestSuite doesn't exist; other tests use SceneTree)
- test_resource_trends.gd: replace Globals.get_node() with get_node()
  (Globals is not declared; SceneTree has get_node directly)
- test_recruit_worker.gd: change preload → load for main.gd,
  add explicit type annotation for initial_count variable
- test_worker_cap.gd: change preload → load for main.gd
  (preload fails at compile time when GameState autoload not yet available)
- CI: add exit-code check for reservation tests step
@itsmiso-ai itsmiso-ai requested a review from joryirving as a code owner June 10, 2026 03:20
@itsmiso-ai

Copy link
Copy Markdown
Contributor Author

Duplicate of #194 — consolidated fix for issue #176. Please track progress on #194 instead.

@itsmiso-ai itsmiso-ai closed this Jun 10, 2026
@itsmiso-ai itsmiso-ai deleted the saffron/issue-176-fix-tests branch June 10, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make all checked-in tests runnable and enforce them in CI

1 participant