Add HTML5 project report fragment
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 22:00:58 +03:00
parent da70128fb2
commit 33bfe70a1e
3 changed files with 59 additions and 1 deletions
+9
View File
@@ -107,6 +107,8 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
assert 'data-html5-page="editor"' in editor.text
assert "data-html5-editor" in editor.text
assert "data-html5-symbol-results" in editor.text
assert "data-html5-project-report" in editor.text
assert f'hx-get="/html5/projects/{project_id}/report"' in editor.text
assert 'hx-get="/html5/projects/' in editor.text
assert 'hx-target="[data-html5-symbol-results]"' in editor.text
assert 'hx-target="[data-html5-source]"' in editor.text
@@ -141,6 +143,13 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
assert "Проверить" in source.text
assert "<html" not in source.text
report = client.get(f"/html5/projects/{project_id}/report")
assert report.status_code == 200
assert "text/html" in report.headers["content-type"]
assert "data-html5-project-report" in report.text
assert "Objects" in report.text
assert "<html" not in report.text
def test_html5_project_index_creates_project_with_fragment():
client = TestClient(app)