diff --git a/l4d2web/tests/test_pages.py b/l4d2web/tests/test_pages.py index 612445b..b31596e 100644 --- a/l4d2web/tests/test_pages.py +++ b/l4d2web/tests/test_pages.py @@ -147,8 +147,6 @@ def test_server_actions_fragment_polls_while_running(auth_client_with_server) -> with session_scope() as session: job = Job(user_id=1, server_id=1, operation="start", state="queued") session.add(job) - session.flush() - job_id = job.id response = auth_client_with_server.get("/servers/1/actions") text = response.get_data(as_text=True) @@ -157,7 +155,10 @@ def test_server_actions_fragment_polls_while_running(auth_client_with_server) -> assert 'id="server-actions"' in text assert " None: @@ -772,5 +773,9 @@ def test_workshop_overlay_refresh_button_hidden_during_build(auth_client_with_se assert response.status_code == 200 assert "Refresh from Steam" not in text # Positive companion: confirm the build-running guard actually fired, - # otherwise the negative could pass vacuously on a broken page. - assert "building…" in text + # otherwise the negative could pass vacuously on a broken page. The + # workshop overlay path includes _overlay_build_status.html with + # omit_badge=True, so the "building…" label is not rendered here; the + # 'hx-trigger="every 2s"' attribute is the unambiguous running-state + # signal that the partial emits regardless of omit_badge. + assert 'hx-trigger="every 2s"' in text