Add HTML5 operations summary polling
This commit is contained in:
@@ -151,6 +151,7 @@ def test_html5_project_index_creates_project_with_fragment():
|
||||
assert 'data-html5-project-create' in index.text
|
||||
assert 'data-html5-projects-body' in index.text
|
||||
assert 'hx-post="/html5/projects"' in index.text
|
||||
assert 'href="/html5/operations"' in index.text
|
||||
|
||||
created = client.post("/html5/projects", data={"project_id": project_id, "name": "HTML5 Created"})
|
||||
assert created.status_code == 200
|
||||
@@ -304,7 +305,9 @@ def test_html5_operations_renders_job_monitor_fragments():
|
||||
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 "data-html5-operations-summary" in page.text
|
||||
assert 'hx-get="/html5/operations/jobs"' in page.text
|
||||
assert 'hx-get="/html5/operations/summary"' in page.text
|
||||
assert project_id in page.text
|
||||
assert "__next" not in page.text
|
||||
|
||||
@@ -315,6 +318,13 @@ def test_html5_operations_renders_job_monitor_fragments():
|
||||
assert project_id in rows.text
|
||||
assert "<html" not in rows.text
|
||||
|
||||
summary = client.get("/html5/operations/summary")
|
||||
assert summary.status_code == 200
|
||||
assert "text/html" in summary.headers["content-type"]
|
||||
assert "data-html5-operations-summary" in summary.text
|
||||
assert "Всего" in summary.text
|
||||
assert "<html" not in summary.text
|
||||
|
||||
|
||||
def test_project_setup_mock_import_indexes_project():
|
||||
client = TestClient(app)
|
||||
|
||||
Reference in New Issue
Block a user