diff --git a/services/hermes/router/main_test.go b/services/hermes/router/main_test.go index 1e402bec..97b98347 100644 --- a/services/hermes/router/main_test.go +++ b/services/hermes/router/main_test.go @@ -166,14 +166,19 @@ func TestSessionContinuityAssetHasAccessiblePollFallback(t *testing.T) { "aria-live", "aria-busy", "/api/sessions/", "/messages?limit=24&hermes_fallback=1", "Latest stored activity", "no renderable messages", "Session updates disconnected", "oauth2/start?rd=", "payload.session_id", - "session.ended_at == null", "latest.observed", + "session.ended_at == null", "latest.observed", "addEventListener('online'", + "addEventListener('pageshow'", "schedule(document.hidden", "fetch(", } { if !strings.Contains(asset, expected) { t.Fatalf("session fallback omitted %q", expected) } } - if strings.Contains(asset, "location.replace") || strings.Contains(asset, "/api/session?") { - t.Fatal("session fallback discards the active session") + for _, forbidden := range []string{ + "location.replace", "location.reload", "history.replaceState", "/api/session?", "WebSocket", + } { + if strings.Contains(asset, forbidden) { + t.Fatalf("session fallback interferes with native continuity via %q", forbidden) + } } }