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 menu label on the MenuBar, then click an item in the dropdown. |
|
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