Merge pull request 'test(e2e): avoid waiting for network idle on Blazor circuit' (#16) from fix/e2e-wait-for-circuit into main
Heimdall Gitea / Build and tests (push) Successful in 28m30s
Heimdall Gitea / Publish versioned release (push) Skipped

This commit was merged in pull request #16.
This commit is contained in:
arnaud.dartois committed 2026-10-21 00:08:04 +02:00
commit 39394d4df2
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -58,7 +58,8 @@ public abstract class E2ETestBase : IAsyncLifetime
var circuitTask = Page.WaitForWebSocketAsync();
await Page.GotoAsync($"{BaseUrl}{path}");
await circuitTask.WaitAsync(TimeSpan.FromSeconds(15));
await Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
// The Blazor circuit keeps SignalR activity open, so waiting for network
// idle can time out even after the page and circuit are ready.
// Give the circuit a moment to hydrate event handlers before we interact.
// Increased delay to allow Blazor content to fully render.
await Task.Delay(2000);
@@ -59,7 +59,7 @@ public class LoginPageTests : E2ETestBase
[Fact]
public async Task Root_redirects_to_login()
{
await Page.GotoAsync($"{BaseUrl}/login", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 15000 });
await Page.GotoAsync($"{BaseUrl}/login", new PageGotoOptions { WaitUntil = WaitUntilState.DOMContentLoaded, Timeout = 30000 });
await Task.Delay(1000);
Page.Url.ShouldContain("/login");
}