mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-18 13:28:12 -04:00
Update tests (#167)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="relative flex-grow">
|
||||
<input type="text" id="@Id" autocomplete="off" class="outline-0 shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white" value="@Value" @oninput="OnInputChanged" placeholder="@Placeholder">
|
||||
</div>
|
||||
<button type="button" class="px-3 text-gray-500 bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:text-white dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800" @onclick="GenerateNewUsername">
|
||||
<button type="button" id="generate-username-button" class="px-3 text-gray-500 bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:text-white dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800" @onclick="GenerateNewUsername">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
||||
</svg>
|
||||
|
||||
@@ -140,7 +140,7 @@ public class CredentialTests : ClientPlaywrightTest
|
||||
});
|
||||
|
||||
// 1. First try to generate new username with no identity fields set yet.
|
||||
var newUsernameButton = Page.Locator("text=New Username").First;
|
||||
var newUsernameButton = Page.Locator("button[id='generate-username-button']");
|
||||
Assert.That(newUsernameButton, Is.Not.Null, "Generate button not found.");
|
||||
await newUsernameButton.ClickAsync();
|
||||
await Task.Delay(100);
|
||||
@@ -170,7 +170,7 @@ public class CredentialTests : ClientPlaywrightTest
|
||||
});
|
||||
|
||||
// 3. Regenerate the username field again.
|
||||
newUsernameButton = Page.Locator("text=New Username").First;
|
||||
newUsernameButton = Page.Locator("button[id='generate-username-button']");
|
||||
await newUsernameButton.ClickAsync();
|
||||
|
||||
await Task.Delay(100);
|
||||
|
||||
@@ -114,7 +114,7 @@ public class EmailDecryptionTests : ClientPlaywrightTest
|
||||
|
||||
// Navigate to the email index page and ensure that the decrypted email is also readable there.
|
||||
await NavigateUsingBlazorRouter("emails");
|
||||
await WaitForUrlAsync("emails", "Inbox");
|
||||
await WaitForUrlAsync("emails", textSubject);
|
||||
|
||||
// Check if the email is visible on the page now.
|
||||
emailContent = await Page.TextContentAsync("body");
|
||||
@@ -227,7 +227,7 @@ public class EmailDecryptionTests : ClientPlaywrightTest
|
||||
|
||||
// Navigate to the email index page and ensure that the decrypted email is also readable there.
|
||||
await NavigateUsingBlazorRouter("emails");
|
||||
await WaitForUrlAsync("emails", "Inbox");
|
||||
await WaitForUrlAsync("emails", textSubject);
|
||||
|
||||
// Check if the email is visible on the page now.
|
||||
emailContent = await Page.TextContentAsync("body");
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GeneralSettingsTests : ClientPlaywrightTest
|
||||
|
||||
// Check if the expected content is present.
|
||||
var pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Default Email Domain"), "No general settings option visible.");
|
||||
Assert.That(pageContent, Does.Contain("Default email domain"), "No general settings option visible.");
|
||||
|
||||
// Set the default email domain to "example2.tld".
|
||||
var defaultEmailDomainField = Page.Locator("select[id='defaultEmailDomain']");
|
||||
|
||||
Reference in New Issue
Block a user