Add HTML5 project panel SSE updates
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 02:46:21 +03:00
parent fb66cfba6f
commit 8a1c0da0ea
3 changed files with 34 additions and 9 deletions
+10
View File
@@ -110,10 +110,13 @@ 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 'sse-swap="project-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 'sse-swap="project-report"' in editor.text
assert f'hx-get="/html5/projects/{project_id}/report"' in editor.text
assert "data-html5-review" in editor.text
assert 'sse-swap="project-review"' in editor.text
assert f'hx-get="/html5/projects/{project_id}/review"' in editor.text
assert "data-html5-authoring-preview" in editor.text
assert "data-html5-authoring-preview-form" in editor.text
@@ -147,7 +150,13 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
first_chunk = next(events.iter_text())
assert "event: status" in first_chunk
assert "event: authoring-changes" in first_chunk
assert "event: project-report" in first_chunk
assert "event: project-review" in first_chunk
assert "event: project-flowchart" in first_chunk
assert "data-html5-authoring-changes" in first_chunk
assert "data-html5-project-report" in first_chunk
assert "data-html5-review" in first_chunk
assert "data-html5-flowchart" in first_chunk
assert "data:" in first_chunk
assert project_id in first_chunk
@@ -477,6 +486,7 @@ def test_html5_flowchart_fragment(tmp_path: Path):
assert "depth=2" in flowchart.text
assert 'hx-target="[data-html5-flowchart]"' in flowchart.text
assert "data-html5-flowchart-focus" in flowchart.text
assert 'sse-swap="project-flowchart"' not in flowchart.text
assert 'hx-swap-oob="outerHTML"' not in flowchart.text
assert "Карта связей" in flowchart.text
assert "Nodes" in flowchart.text