From 5cb22c40d77593d8dd3061ca5eb417aa389a7451 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 11 Feb 2026 21:10:54 +0100 Subject: [PATCH] Update ClientPlaywrightTest.cs --- .../AliasVault.E2ETests/Common/ClientPlaywrightTest.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/server/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs b/apps/server/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs index 49ef62647..792e4ee5c 100644 --- a/apps/server/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs +++ b/apps/server/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs @@ -501,6 +501,12 @@ public abstract class ClientPlaywrightTest : PlaywrightTest /// Async task. protected async Task Register(bool checkForSuccess = true, string? username = null, string? password = null) { + // Check that we are on the login page after navigating to the base URL. + // This hard navigation ensures the Blazor app is fully reset, which is important + // after logout to ensure the router is in a clean state. + await Page.GotoAsync(AppBaseUrl); + await WaitForUrlAsync("user/start", "Log in with"); + // Try to register a new account. await NavigateUsingBlazorRouter("user/register"); await WaitForUrlAsync("user/register", "Create account");