simvx.editor.testing.demo_steps.steps¶
Auto-split from the former flat demo_steps.py.
Module Contents¶
Classes¶
Add a node to the scene via state.add_node(). |
|
Rename a node via state.rename_node(). |
|
Select a node via state.selection.select(). |
|
Set a Property-descriptor value via state.set_node_property(). |
|
Assert a node property equals expected, with actual-value diagnostics. |
|
Set the code viewport text via state.set_script_text(). |
|
Enter play mode via state.play_scene(). |
|
Exit play mode via state.stop_scene(). |
|
Switch viewport mode (“3d”, “2d”, or “code”). |
|
Verify scene tree structure. |
|
Add a node at a specific position (mouse-placement style). |
|
Bulk-set attributes on a node (for non-Property attrs like colours). |
|
Verify multiple properties on a node match expected values. |
|
Click the ‘+’ button in the Scene Tree to open the Add Node dialog. |
|
Type filter text and click a type row in the open Add Node dialog. |
|
Click a node in the scene tree by path to select it. |
|
Click the inspector name field and type a new name. |
|
Edit a property via the inspector widget (SpinBox, TextEdit, or Slider). |
|
Set a colour via the inspector ColourPicker hex input (click hex field, type value, enter). |
|
Expand the anchor-preset widget and click the named preset button. |
|
Click a named toolbar button (‘Play’, ‘Stop’, ‘Pause’, ‘3D’, ‘2D’, ‘Code’). |
|
Click a button by text label in the inspector panel. |
|
Paste content into the active code editor via clipboard + Ctrl+A/Ctrl+V. |
|
Click at a 3D world position in the viewport during play mode. |
|
Click a node in the running game’s isolated SceneTree by path. |
|
Click a menu label on the MenuBar, then click an item in the dropdown. |
|
Click a tab in the editor’s bottom-panel TabContainer by name. |
|
Drag a 2D translate gizmo axis handle and verify the node moved. |
|
Double-click a file row in the file browser and verify it activated. |
|
Click in the code editor and verify the caret moved to that position. |
|
Click a row in the NewSceneDialog to choose a root type. |
Data¶
API¶
- simvx.editor.testing.demo_steps.steps.log¶
‘getLogger(…)’
- class simvx.editor.testing.demo_steps.steps.AddNode[source]¶
Add a node to the scene via state.add_node().
- type_name: str¶
None
- parent_path: str = <Multiline-String>¶
- name: str = <Multiline-String>¶
- class simvx.editor.testing.demo_steps.steps.RenameNode[source]¶
Rename a node via state.rename_node().
- path: str¶
None
- new_name: str¶
None
- class simvx.editor.testing.demo_steps.steps.SelectNode[source]¶
Select a node via state.selection.select().
- path: str¶
None
- class simvx.editor.testing.demo_steps.steps.SetProperty[source]¶
Set a Property-descriptor value via state.set_node_property().
- path: str¶
None
- prop: str¶
None
- value: object¶
None
- class simvx.editor.testing.demo_steps.steps.AssertProperty[source]¶
Assert a node property equals expected, with actual-value diagnostics.
- path: str¶
None
- prop: str¶
None
- expected: object¶
None
- tolerance: float¶
0.5
- message: str = <Multiline-String>¶
- class simvx.editor.testing.demo_steps.steps.SetScript[source]¶
Set the code viewport text via state.set_script_text().
- text: str¶
None
- class simvx.editor.testing.demo_steps.steps.PlayScene[source]¶
Enter play mode via state.play_scene().
- class simvx.editor.testing.demo_steps.steps.StopScene[source]¶
Exit play mode via state.stop_scene().
- class simvx.editor.testing.demo_steps.steps.SwitchViewport[source]¶
Switch viewport mode (“3d”, “2d”, or “code”).
- mode: str¶
None
- class simvx.editor.testing.demo_steps.steps.AssertTree[source]¶
Verify scene tree structure.
expected maps path -> type_name or path -> (type_name, child_count).
- expected: dict¶
None
- message: str = <Multiline-String>¶
- class simvx.editor.testing.demo_steps.steps.PlaceNode[source]¶
Add a node at a specific position (mouse-placement style).
- type_name: str¶
None
- x: float¶
0.0
- y: float¶
0.0
- parent_path: str = <Multiline-String>¶
- name: str = <Multiline-String>¶
- class simvx.editor.testing.demo_steps.steps.ConfigureNode[source]¶
Bulk-set attributes on a node (for non-Property attrs like colours).
- path: str¶
None
- props: dict¶
‘field(…)’
- class simvx.editor.testing.demo_steps.steps.AssertConfig[source]¶
Verify multiple properties on a node match expected values.
- path: str¶
None
- props: dict¶
‘field(…)’
- message: str = <Multiline-String>¶
- class simvx.editor.testing.demo_steps.steps.ClickAddButton[source]¶
Click the ‘+’ button in the Scene Tree to open the Add Node dialog.
- class simvx.editor.testing.demo_steps.steps.DialogSelect[source]¶
Type filter text and click a type row in the open Add Node dialog.
- type_name: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickTreeItem[source]¶
Click a node in the scene tree by path to select it.
- path: str¶
None
- class simvx.editor.testing.demo_steps.steps.InspectorRename[source]¶
Click the inspector name field and type a new name.
- new_name: str¶
None
- class simvx.editor.testing.demo_steps.steps.InspectorEdit[source]¶
Edit a property via the inspector widget (SpinBox, TextEdit, or Slider).
- prop: str¶
None
- value: object¶
None
- component: int¶
None
- class simvx.editor.testing.demo_steps.steps.InspectorSetColour[source]¶
Set a colour via the inspector ColourPicker hex input (click hex field, type value, enter).
- prop: str¶
None
- colour: tuple¶
None
- class simvx.editor.testing.demo_steps.steps.InspectorSetAnchorPreset[source]¶
Expand the anchor-preset widget and click the named preset button.
preset: the AnchorPreset enum member name, e.g. “CENTER”, “FULL_RECT”, “TOP_LEFT”. Mirrors driving the UI a user would use: the demo expands the preset grid, clicks the preset, and the grid collapses.
- preset: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickToolbar[source]¶
Click a named toolbar button (‘Play’, ‘Stop’, ‘Pause’, ‘3D’, ‘2D’, ‘Code’).
- name: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickInspectorButton[source]¶
Click a button by text label in the inspector panel.
- label: str¶
None
- class simvx.editor.testing.demo_steps.steps.PasteInEditor[source]¶
Paste content into the active code editor via clipboard + Ctrl+A/Ctrl+V.
- content: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickViewport3D[source]¶
Click at a 3D world position in the viewport during play mode.
Projects world_pos to screen coordinates using the playing scene’s camera, moves the cursor there, and calls input_cast() for 3D picking.
- world_pos: tuple[float, float, float]¶
None
- class simvx.editor.testing.demo_steps.steps.ClickGameNode[source]¶
Click a node in the running game’s isolated SceneTree by path.
Resolves
pathagainstplay_mode.game_tree.root(Godot-style relative path, e.g."Layout/Grid/Cell_0_0"), reads the node’s global rect in game-space, and maps it back through the editor viewport rect to editor screen coordinates so the simulated click routes correctly through the viewport panel’s input forwarder.- path: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickMenu[source]¶
Click a menu label on the MenuBar, then click an item in the dropdown.
None
- item_text: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickBottomTab[source]¶
Click a tab in the editor’s bottom-panel TabContainer by name.
Routes through the tab bar’s pointer-handler the same way a user click would, so
tab_changedfires and the active tab updates via the public API instead oftabs.current_tab = imutation.- name: str¶
None
- class simvx.editor.testing.demo_steps.steps.DragGizmoAxis[source]¶
Drag a 2D translate gizmo axis handle and verify the node moved.
Selects
path, switches the gizmo to TRANSLATE mode, then drags the named axis handle (“x” or “y”) bydeltacanvas pixels via simulated mouse input. Verifies the selected node’s position changed by the expected delta along that axis (the other axis stays fixed, as the gizmo constrains).- path: str¶
None
- axis: str¶
‘x’
- delta: float¶
40.0
- tolerance: float¶
2.0
- class simvx.editor.testing.demo_steps.steps.DoubleClickFile[source]¶
Double-click a file row in the file browser and verify it activated.
Resolves the file browser’s TreeItem whose path basename matches
filename, double-clicks its row via simulated mouse input, and verifies the panel emittedfile_activated/file_openedfor that path (the item “opened”).- filename: str¶
None
- class simvx.editor.testing.demo_steps.steps.ClickCodeCaret[source]¶
Click in the code editor and verify the caret moved to that position.
Clicks at the screen position of text (
line,col) in the active code editor via simulated mouse input. The editor resolves the pending click to a caret position on its next draw; this step renders one frame through the tree so that resolution runs, then verifies the editor’s_cursor_line/_cursor_collanded on the clicked location.- line: int¶
None
- col: int¶
None