Add HTML5 object runtime context
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user