Add HTML5 project report fragment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user