Add HTML5 project setup view
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 21:22:47 +03:00
parent 03f1af0301
commit 2580cf9832
3 changed files with 211 additions and 2 deletions
+42
View File
@@ -142,6 +142,48 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
assert "<html" not in source.text
def test_html5_project_setup_renders_server_fragments():
client = TestClient(app)
project_id = f"html5-setup-{uuid4()}"
saved = client.post(
f"/projects/{project_id}/settings",
json={
"name": "HTML5 Setup Demo",
"structure_source": "XML_DUMP",
"platform_version": "8.3.24",
"compatibility_mode": "8.3.20",
},
)
assert saved.status_code == 200
imported = client.post(
f"/projects/{project_id}/imports/XML_DUMP",
json={
"source": "XML_DUMP",
"metadata": {"platform_version": "8.3.24", "compatibility_mode": "8.3.20"},
},
)
assert imported.status_code == 200
setup = client.get(f"/html5/projects/{project_id}/setup")
assert setup.status_code == 200
assert "text/html" in setup.headers["content-type"]
assert 'data-html5-page="setup"' in setup.text
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 "XML_DUMP" in setup.text
assert "__next" not in setup.text
summary = client.get(f"/html5/projects/{project_id}/setup/summary")
assert summary.status_code == 200
assert "text/html" in summary.headers["content-type"]
assert "data-html5-setup-summary" in summary.text
assert "INDEXED" in summary.text
assert "mock_indexed" in summary.text
assert "<html" not in summary.text
def test_project_setup_mock_import_indexes_project():
client = TestClient(app)
project_id = f"setup-import-{uuid4()}"