feat: expose workflow execution modes in editor

This commit is contained in:
2026-04-07 11:10:58 +02:00
parent f9d4da52b9
commit 26046fb2d6
7 changed files with 147 additions and 16 deletions
@@ -45,3 +45,40 @@ async def test_node_definitions_endpoint_returns_registry(client, auth_headers):
)
assert blender_still["node_type"] == "renderNode"
assert blender_still["defaults"]["render_engine"] == "cycles"
@pytest.mark.asyncio
async def test_workflow_crud_roundtrip_preserves_execution_mode(client, auth_headers):
create_response = await client.post(
"/api/workflows",
headers=auth_headers,
json={
"name": "Shadow Workflow",
"config": {
"version": 1,
"ui": {
"preset": "custom",
"execution_mode": "shadow",
},
"nodes": [
{
"id": "setup",
"step": StepName.ORDER_LINE_SETUP.value,
"params": {},
}
],
"edges": [],
},
"is_active": True,
},
)
assert create_response.status_code == 201
created = create_response.json()
assert created["config"]["ui"]["execution_mode"] == "shadow"
get_response = await client.get(f"/api/workflows/{created['id']}", headers=auth_headers)
assert get_response.status_code == 200
fetched = get_response.json()
assert fetched["config"]["ui"]["execution_mode"] == "shadow"