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