Add HTML5 project creation form
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 21:30:41 +03:00
parent e71789f51e
commit 86f64de08f
3 changed files with 64 additions and 4 deletions
+23
View File
@@ -142,6 +142,29 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
assert "<html" not in source.text
def test_html5_project_index_creates_project_with_fragment():
client = TestClient(app)
project_id = f"html5-created-{uuid4()}"
index = client.get("/html5")
assert index.status_code == 200
assert 'data-html5-project-create' in index.text
assert 'data-html5-projects-body' in index.text
assert 'hx-post="/html5/projects"' in index.text
created = client.post("/html5/projects", data={"project_id": project_id, "name": "HTML5 Created"})
assert created.status_code == 200
assert "text/html" in created.headers["content-type"]
assert f'data-html5-project="{project_id}"' in created.text
assert "HTML5 Created" in created.text
assert f"/html5/projects/{project_id}/setup" in created.text
assert "<html" not in created.text
setup = client.get(f"/html5/projects/{project_id}/setup")
assert setup.status_code == 200
assert "HTML5 Created" in setup.text
def test_html5_project_setup_renders_server_fragments():
client = TestClient(app)
project_id = f"html5-setup-{uuid4()}"