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

This commit is contained in:
2026-05-17 00:14:55 +03:00
parent b93fd88e81
commit f695846b7b
3 changed files with 66 additions and 1 deletions
+13
View File
@@ -268,6 +268,17 @@ def test_html5_object_context_fragment(tmp_path: Path):
},
)
assert signal.status_code == 200
knowledge = client.post(
"/knowledge",
json={
"record_id": f"knowledge.html5.object.{uuid4()}",
"scope": "PROJECT",
"title": "Правила проведения HTML5",
"body": "Контекст проведения заказа для HTML5 inspector.",
"related_lineages": [handler["lineage_id"]],
},
)
assert knowledge.status_code == 200
editor = client.get(f"/html5/projects/{project_id}/editor")
assert editor.status_code == 200
@@ -288,6 +299,8 @@ def test_html5_object_context_fragment(tmp_path: Path):
assert "1 signals" in context.text
assert "1 errors" in context.text
assert "125.0 ms" in context.text
assert "Правила проведения HTML5" in context.text
assert "Контекст проведения заказа" 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