Files
settled-reach/client/tests/test_main_scene.gd
T
jpmschweitzerandClaude Opus 4.6 603c24e177 feat(client): initialize Godot 4 project boilerplate (epic #277)
Set up the complete Godot 4.6 client foundation as a pure renderer (D-020):
- project.godot with 2D rendering, autoloads, input actions
- Main scene: Game > World (TileMapLayer, Entities, FogOverlay) + Camera2D + UILayer
- Autoloads: SimBridge (connection state machine + test mode), GameState, InputMapper
- Rendering stubs: WorldRenderer, EntityRenderer, FogRenderer
- UI stubs: HUD (health/perception/time), Minimap, MonologueDisplay
- Input mapping: WASD/arrows, E (interact), Tab (perception), Esc (menu), Space (pause)
- gdUnit4 smoke tests: scene loads, autoloads registered (2/2 passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:52:27 +01:00

28 lines
925 B
GDScript

## Smoke tests for main scene initialization
## Run with: godot4 --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -a res://tests/
class_name TestMainScene
extends GdUnitTestSuite
# Smoke test: main scene loads without errors
func test_main_scene_loads() -> void:
var scene = load("res://scenes/main.tscn")
assert_that(scene).is_not_null()
var instance = scene.instantiate()
assert_that(instance).is_not_null()
# Add to scene tree briefly to trigger _ready()
auto_free(instance)
add_child(instance)
# Verify key nodes exist
assert_that(instance.get_node("World")).is_not_null()
assert_that(instance.get_node("Camera2D")).is_not_null()
assert_that(instance.get_node("UILayer")).is_not_null()
# Test: autoloads exist
func test_autoloads_registered() -> void:
assert_that(SimBridge).is_not_null()
assert_that(GameState).is_not_null()
assert_that(InputMapper).is_not_null()