Add server-rendered 1C form editor
This commit is contained in:
@@ -570,6 +570,7 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
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"] == "ПровестиКоманда")
|
||||
form_node = next(node for node in snapshot["nodes"] if node["name"] == "ФормаДокумента")
|
||||
attribute = next(node for node in snapshot["nodes"] if node["name"] == "Контрагент")
|
||||
signal = client.post(
|
||||
f"/projects/{project_id}/runtime/signals",
|
||||
@@ -648,6 +649,7 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
assert "Контрагент" in context.text
|
||||
assert "Товары" in context.text
|
||||
assert "ФормаДокумента" in context.text
|
||||
assert "data-html5-form-editor-link" in context.text
|
||||
assert "Провести" in context.text
|
||||
assert "ПровестиКоманда" in context.text
|
||||
assert "ПроверитьКонтрагента" in context.text
|
||||
@@ -676,6 +678,21 @@ def test_html5_object_context_fragment(tmp_path: Path):
|
||||
assert "data-html5-project-report" in context.text
|
||||
assert "Отчет объекта" in context.text
|
||||
assert "server focused summary" in context.text
|
||||
|
||||
form_editor = client.get(
|
||||
f"/html5/projects/{project_id}/forms/editor",
|
||||
params={"form": form_node["lineage_id"]},
|
||||
)
|
||||
assert form_editor.status_code == 200
|
||||
assert "data-html5-page=\"form-editor\"" in form_editor.text
|
||||
assert "data-html5-form-designer" in form_editor.text
|
||||
assert "data-html5-form-canvas" in form_editor.text
|
||||
assert "Документ.ЗаказПокупателя.ФормаДокумента" in form_editor.text
|
||||
assert "Провести" in form_editor.text
|
||||
assert "ПровестиКоманда" in form_editor.text
|
||||
assert "Модуль формы" in form_editor.text
|
||||
assert 'data-html5-object-cache="warm"' in form_editor.text
|
||||
assert "ПриОткрытии" in form_editor.text
|
||||
assert "data-html5-object-report-summary" in context.text
|
||||
assert "data links" in context.text
|
||||
assert "data-html5-review" in context.text
|
||||
|
||||
Reference in New Issue
Block a user