Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Fix E2E test bug caused by unlock page redirect check (#186)

Leendert de Borstb3e88f9d99cd
diff --git a/src/AliasVault.Client/Auth/Pages/Unlock.razor b/src/AliasVault.Client/Auth/Pages/Unlock.razor
index 3cc73fffe..0d0b3f06e 100644
--- a/src/AliasVault.Client/Auth/Pages/Unlock.razor
+++ b/src/AliasVault.Client/Auth/Pages/Unlock.razor
@@ -114,7 +114,6 @@
// Store the encryption key in memory.
await AuthService.StoreEncryptionKeyAsync(passwordHash);
-
// Redirect to the page the user was trying to access before if set.
var localStorageReturnUrl = await LocalStorage.GetItemAsync<string>("returnUrl");
if (!string.IsNullOrEmpty(localStorageReturnUrl))
diff --git a/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs b/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
index aefc80cbf..953bd7576 100644
--- a/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
+++ b/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
@@ -159,7 +159,10 @@ public class ClientPlaywrightTest : PlaywrightTest
var submitButton = Page.GetByRole(AriaRole.Button, new() { Name = "Unlock" });
await submitButton.ClickAsync();
- // Wait for the original page to load again.
+ // Wait for the sync page to show
+ await WaitForUrlAsync("sync**");
+
+ // Then wait for the original page to load again.
await WaitForUrlAsync(currentUrl);
}
diff --git a/src/Tests/AliasVault.E2ETests/Tests/Client/DbSyncTests.cs b/src/Tests/AliasVault.E2ETests/Tests/Client/DbSyncTests.cs
index 9a8cabc54..1e53c079a 100644
--- a/src/Tests/AliasVault.E2ETests/Tests/Client/DbSyncTests.cs
+++ b/src/Tests/AliasVault.E2ETests/Tests/Client/DbSyncTests.cs
@@ -95,11 +95,6 @@ public class DbSyncTests : ClientPlaywrightTest
await ApiDbContext.SaveChangesAsync();
await UpdateCredentialEntry("TestBaseline3", new Dictionary<string, string> { { "service-name", "TestBaseMutate3" }, { "username", "usermutate3" }, { "email", "emailmutate3" } });
-
- // TODO: investigate why the client1Vault changes are visible here while there does not
- // seem to be an actual merge? Also, the Alias table is not updated with UpdatedAt so it should
- // not trigger a merge anyway. Check why this test gives a false-positive...
- await Task.Delay(50000);
});
// Assert that the two conflicting vaults have been merged and all mutated service names are found.