Add HTML5 operations monitor
This commit is contained in:
@@ -287,6 +287,35 @@ def test_html5_project_setup_renders_server_fragments():
|
||||
assert "<html" not in summary.text
|
||||
|
||||
|
||||
def test_html5_operations_renders_job_monitor_fragments():
|
||||
client = TestClient(app)
|
||||
project_id = f"html5-ops-{uuid4()}"
|
||||
saved = client.post(
|
||||
f"/projects/{project_id}/settings",
|
||||
json={"name": "HTML5 Ops", "structure_source": "XML_DUMP"},
|
||||
)
|
||||
assert saved.status_code == 200
|
||||
|
||||
job = client.post(f"/html5/projects/{project_id}/setup/import-job")
|
||||
assert job.status_code == 200
|
||||
|
||||
page = client.get("/html5/operations")
|
||||
assert page.status_code == 200
|
||||
assert "text/html" in page.headers["content-type"]
|
||||
assert 'data-html5-page="operations"' in page.text
|
||||
assert "data-html5-operations-body" in page.text
|
||||
assert 'hx-get="/html5/operations/jobs"' in page.text
|
||||
assert project_id in page.text
|
||||
assert "__next" not in page.text
|
||||
|
||||
rows = client.get("/html5/operations/jobs")
|
||||
assert rows.status_code == 200
|
||||
assert "text/html" in rows.headers["content-type"]
|
||||
assert "data-html5-operation" in rows.text
|
||||
assert project_id in rows.text
|
||||
assert "<html" not in rows.text
|
||||
|
||||
|
||||
def test_project_setup_mock_import_indexes_project():
|
||||
client = TestClient(app)
|
||||
project_id = f"setup-import-{uuid4()}"
|
||||
|
||||
Reference in New Issue
Block a user