diff --git a/tests/test_run_journal_frontend_static.py b/tests/test_run_journal_frontend_static.py index 68b8b548..4f0e2b4b 100644 --- a/tests/test_run_journal_frontend_static.py +++ b/tests/test_run_journal_frontend_static.py @@ -222,8 +222,12 @@ def test_reattach_path_uses_replay_when_status_reports_journal(): def test_error_reconnect_path_can_restore_from_journal(): - reconnect_pos = MESSAGES_SRC.index("setComposerStatus('Reconnecting") - block = MESSAGES_SRC[reconnect_pos : reconnect_pos + 900] + # Anchor on the reconnect block's stable entry point rather than the exact + # composer-status string: the first status was changed to a template literal + # `Reconnecting… (1/${_retryDelays.length})` (staged-probe counter), so the + # old single-quoted "setComposerStatus('Reconnecting" anchor no longer exists. + reconnect_pos = MESSAGES_SRC.index("_reconnectAttempted=true;") + block = MESSAGES_SRC[reconnect_pos : reconnect_pos + 1100] assert "st.active" in block assert "st.replay_available" in block