Add HTML5 authoring SSE updates
This commit is contained in:
@@ -125,6 +125,7 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
|
||||
assert f'hx-post="/html5/projects/{project_id}/authoring/metadata-object-preview"' in editor.text
|
||||
assert "data-html5-authoring-changes" in editor.text
|
||||
assert f'hx-get="/html5/projects/{project_id}/authoring/changes"' in editor.text
|
||||
assert 'sse-swap="authoring-changes"' in editor.text
|
||||
assert 'hx-get="/html5/projects/' in editor.text
|
||||
assert 'hx-target="[data-html5-symbol-results]"' in editor.text
|
||||
assert 'hx-target="[data-html5-symbol-detail]"' in editor.text
|
||||
@@ -145,6 +146,8 @@ def test_html5_server_rendered_project_editor(tmp_path: Path):
|
||||
with client.stream("GET", f"/html5/projects/{project_id}/events?once=1") as events:
|
||||
first_chunk = next(events.iter_text())
|
||||
assert "event: status" in first_chunk
|
||||
assert "event: authoring-changes" in first_chunk
|
||||
assert "data-html5-authoring-changes" in first_chunk
|
||||
assert "data:" in first_chunk
|
||||
assert project_id in first_chunk
|
||||
|
||||
|
||||
Reference in New Issue
Block a user