Add headless regression tests for Phase 4b features
- Implement test for popup anchor behavior in rule-builder menus to ensure consistent anchor positioning during menu transitions. - Create tests for stage logic, including mode transitions, toolbar visibility, and status bar updates. - Add terrain drag-painting tests to verify correct block placement behavior and conflict handling. - Introduce walk waypoint tests to check for arrival conditions and position stability after navigation.
This commit is contained in:
@@ -543,7 +543,8 @@ if _direct_mode:
|
||||
- If `_pending_walk_target` and `_context_rig` valid → append
|
||||
`{"type":"walk_to","target":world_pos}` to `_context_rig`; clear pending + context.
|
||||
- Else `var hit := _selection.hit_test(world_pos)`; if `hit is STICKMAN_RIG` →
|
||||
`_context_rig = hit`, position `_action_popup` at the mouse and `popup()`. Non-stickman
|
||||
`_context_rig = hit`, position `_action_popup` to the **right of the clicked stickman**
|
||||
(`_world_to_screen(hit.global_position)` + 24 px) and `popup()`. Non-stickman
|
||||
clicks are ignored.
|
||||
|
||||
**Popup handler `_on_action_popup_id_pressed(id)`** (guards `_context_rig` valid):
|
||||
@@ -657,7 +658,7 @@ Implementation notes:
|
||||
## 7. UI flow (Milestone 3)
|
||||
|
||||
1. Press **"Direct"** (toggle). Palette spawn modes are cleared (mutually exclusive).
|
||||
2. Click a stickman → `StageSelection.hit_test` → if stickman, open `_action_popup` at cursor.
|
||||
2. Click a stickman → `StageSelection.hit_test` → if stickman, open `_action_popup` to the right of the clicked stickman (its world position converted to screen + 24 px).
|
||||
3. Choose:
|
||||
- **Walk To** → enters pending mode; status hint ("Click stage for walk target — Esc to cancel").
|
||||
- **Speak** → text dialog → append `speak` action.
|
||||
|
||||
Reference in New Issue
Block a user