Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update tests with new item create type chooser (#2287)
Leendert de Borst39ec426bb7a1
diff --git a/apps/server/Tests/AliasVault.E2ETests/Common/BrowserExtensionPlaywrightTest.cs b/apps/server/Tests/AliasVault.E2ETests/Common/BrowserExtensionPlaywrightTest.csindex 4b59a2a1f..41198add8 100644--- a/apps/server/Tests/AliasVault.E2ETests/Common/BrowserExtensionPlaywrightTest.cs+++ b/apps/server/Tests/AliasVault.E2ETests/Common/BrowserExtensionPlaywrightTest.cs@@ -120,18 +120,32 @@ public class BrowserExtensionPlaywrightTest : ClientPlaywrightTest}/// <summary>- /// Create a new credential in the browser extension.+ /// Open the add item form in the browser extension by clicking the add button and picking an item type./// </summary>/// <param name="extensionPopup">The extension popup page.</param>- /// <param name="serviceName">The name of the credential to create.</param>+ /// <param name="itemType">The item type to create, e.g. "Login", "Alias", "CreditCard" or "Note".</param>/// <returns>Async task.</returns>- protected async Task CreateCredentialInExtension(IPage extensionPopup, string serviceName)+ protected async Task OpenAddItemForm(IPage extensionPopup, string itemType = "Login"){- // Click add new item button+ // Click add new item button which opens the item type dropdownawait extensionPopup.ClickAsync("button[title='Add new item']");+ // Choose the item type to create+ await extensionPopup.ClickAsync($"button#add-item-type-{itemType}");+// Wait for the item name field to be visibleawait extensionPopup.WaitForSelectorAsync("input#itemName");+ }++ /// <summary>+ /// Create a new credential in the browser extension.+ /// </summary>+ /// <param name="extensionPopup">The extension popup page.</param>+ /// <param name="serviceName">The name of the credential to create.</param>+ /// <returns>Async task.</returns>+ protected async Task CreateCredentialInExtension(IPage extensionPopup, string serviceName)+ {+ await OpenAddItemForm(extensionPopup);// Fill in the credential nameawait extensionPopup.FillAsync("input#itemName", serviceName);diff --git a/apps/server/Tests/AliasVault.E2ETests/Tests/Extensions/ChromeExtensionTests.cs b/apps/server/Tests/AliasVault.E2ETests/Tests/Extensions/ChromeExtensionTests.csindex f8a71bd99..b4fc9a09d 100644--- a/apps/server/Tests/AliasVault.E2ETests/Tests/Extensions/ChromeExtensionTests.cs+++ b/apps/server/Tests/AliasVault.E2ETests/Tests/Extensions/ChromeExtensionTests.cs@@ -271,8 +271,7 @@ public class ChromeExtensionTests : BrowserExtensionPlaywrightTest// 4. Create a credential while offline (saved locally, can't sync)var serviceName = "Dirty Vault Recovery Test";- await extensionPopup.ClickAsync("button[title='Add new item']");- await extensionPopup.WaitForSelectorAsync("input#itemName");+ await OpenAddItemForm(extensionPopup);await extensionPopup.FillAsync("input#itemName", serviceName);await extensionPopup.ClickAsync("button#save-credential");