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

This commit is contained in:
2026-05-17 00:28:54 +03:00
parent 79ae2b3023
commit c871a8bbd2
3 changed files with 86 additions and 2 deletions
+17 -1
View File
@@ -250,7 +250,19 @@ def test_html5_object_context_fragment(tmp_path: Path):
)
module = tmp_path / "Documents" / "ЗаказПокупателя" / "Ext" / "ObjectModule.bsl"
module.parent.mkdir(parents=True)
module.write_text("Процедура ПровестиКоманда()\nКонецПроцедуры\n", encoding="utf-8")
module.write_text(
"""
Процедура ПровестиКоманда()
ПроверитьКонтрагента();
Соединение = Новый HTTPСоединение("api.example.local");
Адрес = "https://api.example.local/orders";
КонецПроцедуры
Процедура ПроверитьКонтрагента()
КонецПроцедуры
""",
encoding="utf-8",
)
client = TestClient(app)
indexed = client.post("/projects/index", json={"path": str(tmp_path), "project_id": project_id})
assert indexed.status_code == 200
@@ -306,6 +318,10 @@ def test_html5_object_context_fragment(tmp_path: Path):
assert "ФормаДокумента" in context.text
assert "Провести" in context.text
assert "ПровестиКоманда" in context.text
assert "ПроверитьКонтрагента" in context.text
assert "HTTPConnection" in context.text
assert "https://api.example.local/orders" in context.text
assert "OUTBOUND" in context.text
assert "1 signals" in context.text
assert "1 errors" in context.text
assert "125.0 ms" in context.text