Add HTML5 object UI context
This commit is contained in:
@@ -237,6 +237,9 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
<TabularSection name="Товары" qualifiedName="Документ.ЗаказПокупателя.Товары">
|
||||
<Attribute name="Количество" qualifiedName="Документ.ЗаказПокупателя.Товары.Количество" />
|
||||
</TabularSection>
|
||||
<Form name="ФормаДокумента" qualifiedName="Документ.ЗаказПокупателя.ФормаДокумента">
|
||||
<Command name="Провести" qualifiedName="Документ.ЗаказПокупателя.ФормаДокумента.Провести" action="ПровестиКоманда" />
|
||||
</Form>
|
||||
</Document>
|
||||
<Role name="Менеджер" qualifiedName="Роль.Менеджер">
|
||||
<Right object="Документ.ЗаказПокупателя" read="true" write="true" post="true" />
|
||||
@@ -245,6 +248,9 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
module = tmp_path / "Documents" / "ЗаказПокупателя" / "Ext" / "ObjectModule.bsl"
|
||||
module.parent.mkdir(parents=True)
|
||||
module.write_text("Процедура ПровестиКоманда()\nКонецПроцедуры\n", 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
|
||||
@@ -262,6 +268,9 @@ 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 "Провести" 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
|
||||
|
||||
Reference in New Issue
Block a user