simvx.editor.testing.demo_steps.steps

Auto-split from the former flat demo_steps.py.

Module Contents

Classes

AddNode

Add a node to the scene via state.add_node().

RenameNode

Rename a node via state.rename_node().

SelectNode

Select a node via state.selection.select().

SetProperty

Set a Property-descriptor value via state.set_node_property().

AssertProperty

Assert a node property equals expected, with actual-value diagnostics.

SetScript

Set the code viewport text via state.set_script_text().

PlayScene

Enter play mode via state.play_scene().

StopScene

Exit play mode via state.stop_scene().

SwitchViewport

Switch viewport mode (“3d”, “2d”, or “code”).

AssertTree

Verify scene tree structure.

PlaceNode

Add a node at a specific position (mouse-placement style).

ConfigureNode

Bulk-set attributes on a node (for non-Property attrs like colours).

AssertConfig

Verify multiple properties on a node match expected values.

ClickAddButton

Click the ‘+’ button in the Scene Tree to open the Add Node dialog.

DialogSelect

Type filter text and click a type row in the open Add Node dialog.

ClickTreeItem

Click a node in the scene tree by path to select it.

InspectorRename

Click the inspector name field and type a new name.

InspectorEdit

Edit a property via the inspector widget (SpinBox, TextEdit, or Slider).

InspectorSetColour

Set a colour via the inspector ColourPicker hex input (click hex field, type value, enter).

InspectorSetAnchorPreset

Expand the anchor-preset widget and click the named preset button.

ClickToolbar

Click a named toolbar button (‘Play’, ‘Stop’, ‘Pause’, ‘3D’, ‘2D’, ‘Code’).

ClickInspectorButton

Click a button by text label in the inspector panel.

PasteInEditor

Paste content into the active code editor via clipboard + Ctrl+A/Ctrl+V.

ClickViewport3D

Click at a 3D world position in the viewport during play mode.

ClickGameNode

Click a node in the running game’s isolated SceneTree by path.

ClickMenu

Click a menu label on the MenuBar, then click an item in the dropdown.

ClickBottomTab

Click a tab in the editor’s bottom-panel TabContainer by name.

DragGizmoAxis

Drag a 2D translate gizmo axis handle and verify the node moved.

DoubleClickFile

Double-click a file row in the file browser and verify it activated.

ClickCodeCaret

Click in the code editor and verify the caret moved to that position.

NewSceneSelect

Click a row in the NewSceneDialog to choose a root type.

Data

log

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 path against play_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.

menu_name: str

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_changed fires and the active tab updates via the public API instead of tabs.current_tab = i mutation.

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”) by delta canvas 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 emitted file_activated / file_opened for 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_col landed on the clicked location.

line: int

None

col: int

None

class simvx.editor.testing.demo_steps.steps.NewSceneSelect[source]

Click a row in the NewSceneDialog to choose a root type.

root_type: str

None