Skip to content

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

Update tests (#628)

Leendert de Borst63c737b6ccbd
diff --git a/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs b/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
index 1bc5e7d96..6d4094d89 100644
--- a/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
+++ b/src/Tests/AliasVault.E2ETests/Common/ClientPlaywrightTest.cs
@@ -34,7 +34,7 @@ public class ClientPlaywrightTest : PlaywrightTest
/// Gets the welcome message that is expected to be displayed on the index page.
/// This is used to verify that the user is logged in successfully.
/// </summary>
- protected static string WelcomeMessage { get; } = "Your account has been successfully created";
+ protected static string WelcomeMessage { get; } = "Your vault has been successfully created";
/// <summary>
/// Gets the time provider instance for mutating the current WebApi time in tests.
diff --git a/src/Tests/AliasVault.E2ETests/Tests/Client/Shard2/DbPersistTests.cs b/src/Tests/AliasVault.E2ETests/Tests/Client/Shard2/DbPersistTests.cs
index 5e8824f75..da5fcfadf 100644
--- a/src/Tests/AliasVault.E2ETests/Tests/Client/Shard2/DbPersistTests.cs
+++ b/src/Tests/AliasVault.E2ETests/Tests/Client/Shard2/DbPersistTests.cs
@@ -56,16 +56,17 @@ public class DbPersistTests : ClientPlaywrightTest
[Order(2)]
public async Task VaultRevisionNumberIncrementTest()
{
- // Assert that the vault revision number is 1 in the server database.
+ // Assert that the vault revision number is 2 in the server database.
+ // Account registration will create a new vault with revision number 1, first credential save will increment to 2.
// Note: for this we expect the previous test to have run first and created a first credential.
- var firstUpdateVault = await ApiDbContext.Vaults.OrderByDescending(x => x.UpdatedAt).FirstAsync();
- Assert.That(firstUpdateVault.RevisionNumber, Is.EqualTo(1), "Vault revision number is not at 1 after creating the first credential in a new vault.");
+ var firstUpdateVault = await ApiDbContext.Vaults.OrderByDescending(x => x.RevisionNumber).FirstAsync();
+ Assert.That(firstUpdateVault.RevisionNumber, Is.EqualTo(2), "Vault revision number is not at 2 after creating the first credential in a new vault.");
// Create a new credential which will trigger a vault save to the server.
await CreateCredentialEntry();
- // Assert that the vault revision number is now 2 in the server database.
- var secondUpdateVault = await ApiDbContext.Vaults.OrderByDescending(x => x.UpdatedAt).FirstAsync();
- Assert.That(secondUpdateVault.RevisionNumber, Is.EqualTo(2), "Vault revision number is not 2 after the second credential save.");
+ // Assert that the vault revision number is now 3 in the server database.
+ var secondUpdateVault = await ApiDbContext.Vaults.OrderByDescending(x => x.RevisionNumber).FirstAsync();
+ Assert.That(secondUpdateVault.RevisionNumber, Is.EqualTo(3), "Vault revision number is not 3 after the second credential save.");
}
}
diff --git a/src/Tests/AliasVault.E2ETests/Tests/Client/Shard4/WelcomeScreenTests.cs b/src/Tests/AliasVault.E2ETests/Tests/Client/Shard4/WelcomeScreenTests.cs
index 5ebe36147..aa44f24ab 100644
--- a/src/Tests/AliasVault.E2ETests/Tests/Client/Shard4/WelcomeScreenTests.cs
+++ b/src/Tests/AliasVault.E2ETests/Tests/Client/Shard4/WelcomeScreenTests.cs
@@ -34,8 +34,8 @@ public class WelcomeScreenTests : ClientPlaywrightTest
continueButton = await WaitForAndGetElement("button:has-text('Continue')");
await continueButton.ClickAsync();
- // Wait for the "Privacy & Security Tips" step to load.
- await WaitForUrlAsync("welcome", "Security Tips");
+ // Wait for the "Tips" step to load.
+ await WaitForUrlAsync("welcome", "Tips");
// Click on the "Get started" button.
var getStartedButton = await WaitForAndGetElement("button:has-text('Get started')");