Add HTML5 object runtime context
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 00:11:26 +03:00
parent 1da745c52e
commit b93fd88e81
3 changed files with 67 additions and 1 deletions
+17
View File
@@ -254,6 +254,20 @@ def test_html5_object_context_fragment(tmp_path: Path):
client = TestClient(app)
indexed = client.post("/projects/index", json={"path": str(tmp_path), "project_id": project_id})
assert indexed.status_code == 200
snapshot = client.get(f"/projects/{project_id}/snapshot/export").json()
handler = next(node for node in snapshot["nodes"] if node["name"] == "ПровестиКоманда")
signal = client.post(
f"/projects/{project_id}/runtime/signals",
json={
"signal": {
"signal_id": "html5-runtime.1",
"lineage_id": handler["lineage_id"],
"kind": "ERROR",
"duration_ms": 125.0,
}
},
)
assert signal.status_code == 200
editor = client.get(f"/html5/projects/{project_id}/editor")
assert editor.status_code == 200
@@ -271,6 +285,9 @@ def test_html5_object_context_fragment(tmp_path: Path):
assert "ФормаДокумента" in context.text
assert "Провести" in context.text
assert "ПровестиКоманда" in context.text
assert "1 signals" in context.text
assert "1 errors" in context.text
assert "125.0 ms" in context.text
assert "Роль.Менеджер" in context.text
assert "read, write, post" in context.text or "post, read, write" in context.text
assert "<html" not in context.text