diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTests.cs index 680849b0..31b36b64 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTests.cs @@ -115,9 +115,12 @@ public class DebugViewTests : IClassFixture 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']"))