test(e2e): fail fast on missing Live badge in DebugView connect test (review fix)

This commit is contained in:
Joseph Doherty
2026-06-06 13:41:29 -04:00
parent 828d035221
commit 1b2290d468
@@ -115,9 +115,12 @@ public class DebugViewTests : IClassFixture<DeploymentFixture>
var terminal = page.Locator("span.badge[aria-label='Connection state: Live'], .toast");
await Assertions.Expect(terminal.First).ToBeVisibleAsync(new() { Timeout = 25_000 });
// Tightened to the observed-reliable Live outcome.
// Tightened to the observed-reliable Live outcome. Short timeout: the OR-floor
// above already resolved, so the Live badge is either present now or a toast
// resolved instead (the error path) — in which case this fails fast rather than
// burning the full window waiting for a badge that will never appear.
await Assertions.Expect(page.Locator("span.badge[aria-label='Connection state: Live']"))
.ToBeVisibleAsync(new() { Timeout = 25_000 });
.ToBeVisibleAsync(new() { Timeout = 2_000 });
await page.Locator("button.btn-outline-danger.btn-sm:has-text('Disconnect')").ClickAsync();
await Assertions.Expect(page.Locator("span.badge[aria-label='Connection state: Disconnected']"))