Add HTML5 setup form actions
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 21:26:54 +03:00
parent 2580cf9832
commit e71789f51e
3 changed files with 133 additions and 2 deletions
+21
View File
@@ -172,9 +172,30 @@ def test_html5_project_setup_renders_server_fragments():
assert "HTML5 Setup Demo" in setup.text
assert "data-html5-setup-summary" in setup.text
assert f'hx-get="/html5/projects/{project_id}/setup/summary"' in setup.text
assert f'hx-post="/html5/projects/{project_id}/setup/source"' in setup.text
assert f'hx-post="/html5/projects/{project_id}/setup/import"' in setup.text
assert f'hx-post="/html5/projects/{project_id}/setup/reindex"' in setup.text
assert "XML_DUMP" in setup.text
assert "__next" not in setup.text
source = client.post(f"/html5/projects/{project_id}/setup/source", data={"source": "EDT_PROJECT"})
assert source.status_code == 200
assert "data-html5-setup-summary" in source.text
assert "EDT_PROJECT" in source.text
assert "<html" not in source.text
html5_import = client.post(f"/html5/projects/{project_id}/setup/import")
assert html5_import.status_code == 200
assert "data-html5-setup-summary" in html5_import.text
assert "mock_indexed" in html5_import.text
assert "<html" not in html5_import.text
reindex = client.post(f"/html5/projects/{project_id}/setup/reindex")
assert reindex.status_code == 200
assert "data-html5-setup-summary" in reindex.text
assert "reindexed" in reindex.text
assert "<html" not in reindex.text
summary = client.get(f"/html5/projects/{project_id}/setup/summary")
assert summary.status_code == 200
assert "text/html" in summary.headers["content-type"]