Add HTML5 flowchart depth controls
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 01:22:28 +03:00
parent 20c1b1809b
commit 6cc669f694
3 changed files with 49 additions and 6 deletions
+15 -1
View File
@@ -109,7 +109,7 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
assert "data-html5-symbol-results" in editor.text
assert "data-html5-symbol-detail" in editor.text
assert "data-html5-flowchart" in editor.text
assert f'hx-get="/html5/projects/{project_id}/flowchart"' in editor.text
assert f'hx-get="/html5/projects/{project_id}/flowchart?depth=1"' in editor.text
assert "data-html5-project-report" in editor.text
assert f'hx-get="/html5/projects/{project_id}/report"' in editor.text
assert "data-html5-review" in editor.text
@@ -421,6 +421,12 @@ def test_html5_flowchart_fragment(tmp_path: Path):
assert flowchart.status_code == 200
assert "text/html" in flowchart.headers["content-type"]
assert "data-html5-flowchart" in flowchart.text
assert "data-html5-flowchart-actions" in flowchart.text
assert "Depth 1" in flowchart.text
assert "Depth 2" in flowchart.text
assert "Depth 3" in flowchart.text
assert "depth=2" in flowchart.text
assert 'hx-target="[data-html5-flowchart]"' in flowchart.text
assert 'hx-swap-oob="outerHTML"' not in flowchart.text
assert "Карта связей" in flowchart.text
assert "Nodes" in flowchart.text
@@ -428,6 +434,14 @@ def test_html5_flowchart_fragment(tmp_path: Path):
assert "ПровестиЗаказ" in flowchart.text or "ПроверитьОстатки" in flowchart.text
assert "<html" not in flowchart.text
deep_flowchart = client.get(
f"/html5/projects/{project_id}/flowchart",
params={"focus": "ПровестиЗаказ", "depth": 2},
)
assert deep_flowchart.status_code == 200
assert "depth=2" in deep_flowchart.text
assert 'data-html5-object-action-active="true"' in deep_flowchart.text
def test_html5_project_setup_renders_server_fragments():
client = TestClient(app)