You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f62c9c9
Browse filesBrowse the repository at this point in the historyBrowse files
test(menu): run the hover-driven menu smoke tests headless (#87)
* test(menu): run the hover-driven menu smoke tests headless
[Agent: Claude Code | Model: Opus 5.5 | Thinking: High | Acting on behalf of: Erik | Skill: none]
Closes#56. menu_smoke and menu_hoppy_smoke were skipped in CI because
their hover checks failed headless; everything else in them passed.
Three causes: the 64x64 headless window's stretch transform scales a
pointer event's position and the menu recenters in a 1280x1280 visible
area, so fixed coordinates miss the buttons; Input.parse_input_event()
never hovers anything headless; and push_input() is delivered at once
while parsed events wait a frame, so the D-pad release sent just before
re-selected the brawler after the hover.
- tests/support/pointer.gd hovers a control at its actual rect with
viewport.push_input(event, true), after flushing buffered input, the
same way in rendered and headless runs.
- Both suites use it; menu_smoke finishes with AudioService.settle().
- tools/tests/suites.toml no longer skips them.
- CONTRIBUTING and docs/main-menu.md say hover works headless.
* test(menu): aim the pointer in viewport coordinates
[Agent: Claude Code | Model: Opus 5.5 | Thinking: High | Acting on behalf of: Erik | Skill: none]
Addresses CodeRabbit review 5542805293 on #87: hover() maps the
control's centre through get_global_transform_with_canvas(), so a
control under a canvas layer or camera transform is still hit.
python3 tools/tests/run_tests.py --list # what runs and what is skipped
38
38
```
39
39
40
-
-**Every new `.gd` file under `tests/` that `extends SceneTree` or `MainLoop` runs automatically.** Shared helpers that extend anything else, such as `tests/support/`, are never run as suites. There's no list to update. To keep a suite out of CI (it needs a GPU, a window or pointer hover), add it to `[skip]` in [`tools/tests/suites.toml`](tools/tests/suites.toml) with the reason.
40
+
-**Every new `.gd` file under `tests/` that `extends SceneTree` or `MainLoop` runs automatically.** Shared helpers that extend anything else, such as `tests/support/`, are never run as suites. There's no list to update. To keep a suite out of CI (it needs a GPUor a window), add it to `[skip]` in [`tools/tests/suites.toml`](tools/tests/suites.toml) with the reason. Pointer hover works headless through [`tests/support/pointer.gd`](hoppys-adventure-arcade/tests/support/pointer.gd); `Input.parse_input_event()` never hovers anything in a headless run.
41
41
-**A suite fails if it exits nonzero, times out, or prints an engine or script error or an exit-time leak.** Suites run with `--verbose`, so a leak names the objects involved. The one tolerated shape is the engine's audio-teardown race: only `AudioStream*` playbacks and audio files, reported as a note. Anything else that leaks fails. That includes `ERROR:`, `SCRIPT ERROR`, parse errors and "leaked at exit". If a test provokes an engine error on purpose, list a pattern for it under `[expected_errors]`; the runner fails if that pattern stops matching.
42
42
-**Finish a suite with `await root.get_node("AudioService").settle()` before `quit()`.** It stops the shared music and waits until the audio thread has released it. A fixed delay is not enough under parallel load.
43
43
- Each suite gets a private user-data root (`HOME`, the XDG directories, and `APPDATA` on Windows), so `user://` files (settings, leaderboards) never touch your real ones. The runner checks this with Godot before starting and refuses to run if `user://` would escape. Suites listed under `[serial]` (wall-clock budgets, or suites that occupy every core) run alone after the parallel batch. Results are written to `build/test-results/summary.json`.
The behavioral smoke test covers preview timing and preservation, rapid input coalescing, bounded preview count, all thirteen previews, modal focus restoration, invalid routes, duplicate navigation, all three mode round trips, and audio player counts. It also dispatches keyboard, simulated gamepad, and mouse events. A rendered run writes menu/settings screenshots to `/tmp` for layout inspection. It uses the normal settings path, so run against a disposable user profile if preserving settings during tests matters.
58
+
The behavioral smoke test covers preview timing and preservation, rapid input coalescing, bounded preview count, all thirteen previews, modal focus restoration, invalid routes, duplicate navigation, all three mode round trips, and audio player counts. It also dispatches keyboard, simulated gamepad, and mouse events. Mouse hover goes through `tests/support/pointer.gd`, so it and the character check below run headless in CI. A rendered run writes menu/settings screenshots to `/tmp` for layout inspection. It uses the normal settings path, so run against a disposable user profile if preserving settings during tests matters.
59
59
60
60
Physical controller feel, audio loop quality, and Windows/Linux exports require later hands-on checks; no export presets or platform builds were added.
0 commit comments