mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-21 08:02:45 -04:00
Update tests (#220)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
@implements IAsyncDisposable
|
||||
|
||||
<button @ref="buttonRef" @onclick="TogglePopup" id="quickIdentityButton" class="px-4 py-2 text-sm font-medium text-white bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 focus:outline-none dark:from-primary-400 dark:to-primary-500 dark:hover:from-primary-500 dark:hover:to-primary-600 rounded-md shadow-sm transition duration-150 ease-in-out transform hover:scale-105 active:scale-95 focus:shadow-outline">
|
||||
+ <span class="hidden md:inline">New identity</span>
|
||||
+ <span class="hidden md:inline">New Alias</span>
|
||||
</button>
|
||||
|
||||
@if (IsPopupVisible)
|
||||
@@ -13,7 +13,7 @@
|
||||
<ClickOutsideHandler OnClose="ClosePopup" ContentId="quickIdentityPopup,quickIdentityButton">
|
||||
<div id="quickIdentityPopup" class="absolute z-50 mt-2 p-4 bg-white rounded-lg shadow-xl border border-gray-300"
|
||||
style="@PopupStyle">
|
||||
<h3 class="text-lg font-semibold mb-4">Create New Identity</h3>
|
||||
<h3 class="text-lg font-semibold mb-4">Create New Alias</h3>
|
||||
<EditForm Model="Model" OnValidSubmit="CreateIdentity">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="mb-4">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
@code {
|
||||
private static readonly string[] Quotes =
|
||||
[
|
||||
"Tip: Use the g+c (go create) keyboard shortcut to quickly create a new identity.",
|
||||
"Tip: Use the g+c (go create) keyboard shortcut to quickly create a new alias.",
|
||||
"Tip: Use the g+f (go find) keyboard shortcut to focus the search field.",
|
||||
"Tip: Use the g+h (go home) keyboard shortcut to go to the homepage.",
|
||||
"Tip: Use the g+l (go lock) keyboard shortcut to lock the vault.",
|
||||
|
||||
@@ -228,7 +228,7 @@ else
|
||||
|
||||
if (!EditMode)
|
||||
{
|
||||
// When creating a new identity: start with focus on the service name input.
|
||||
// When creating a new alias: start with focus on the service name input.
|
||||
await JsInteropService.FocusElementById("service-name");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ else if (NoEmailClaims)
|
||||
{
|
||||
<div class="p-4 mx-4 mt-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 dark:bg-gray-800">
|
||||
<div class="px-4 py-2 text-gray-400 rounded">
|
||||
<p class="text-gray-500 dark:text-gray-400">You are not using any private email addresses (yet). Create a new identity and use a private email address supported by AliasVault. All emails received by these private email addresses will show up here.</p>
|
||||
<p class="text-gray-500 dark:text-gray-400">You are not using any private email addresses (yet). Create a new alias and use a private email address supported by AliasVault. All emails received by these private email addresses will show up here.</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-white">How do I use AliasVault?</h3>
|
||||
<p class="text-gray-600 dark:text-gray-400">Create a random identity with an associated email address. To get started, simply click the "+ New Identity" button in the top right corner.</p>
|
||||
<p class="text-gray-600 dark:text-gray-400">Create a random identity with an associated email address. To get started, simply click the "+ New Alias" button in the top right corner.</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-white">What is the purpose of AliasVault?</h3>
|
||||
@@ -28,7 +28,7 @@
|
||||
<h2 class="text-2xl font-semibold mb-4 text-gray-900 dark:text-white">Get Started Now</h2>
|
||||
<div class="mb-4">
|
||||
<p class="text-gray-600 dark:text-gray-400">
|
||||
Go ahead and create a new login by clicking "+ New Identity" in the top right. Or explore these options:
|
||||
Go ahead and create a new login by clicking "+ New Alias" in the top right. Or explore these options:
|
||||
</p>
|
||||
</div>
|
||||
<div class="space-y-4">
|
||||
|
||||
@@ -100,7 +100,7 @@ public class CredentialTests : ClientPlaywrightTest
|
||||
Assert.That(pageContent, Does.Contain(serviceNameBefore), "Created credential service name does not appear on login page.");
|
||||
|
||||
// Click the edit button.
|
||||
var editButton = Page.Locator("text=Edit credentials entry").First;
|
||||
var editButton = Page.Locator("text=Edit").First;
|
||||
await editButton.ClickAsync();
|
||||
await WaitForUrlAsync("edit", "Save Credentials");
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CredentialTests : ClientPlaywrightTest
|
||||
|
||||
var submitButton = Page.Locator("text=Save Credentials").First;
|
||||
await submitButton.ClickAsync();
|
||||
await WaitForUrlAsync("credentials/**", "Delete credentials entry");
|
||||
await WaitForUrlAsync("credentials/**", "Delete");
|
||||
|
||||
pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Credentials updated"), "Credential update confirmation message not shown.");
|
||||
|
||||
@@ -36,7 +36,7 @@ public class JwtTokenTests : ClientPlaywrightTest
|
||||
await WaitForUrlAsync("test/2", "Test 2 OK");
|
||||
|
||||
var pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 2."), "No page content after refreshing access token.");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 2"), "No page content after refreshing access token.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -74,7 +74,7 @@ public class JwtTokenTests : ClientPlaywrightTest
|
||||
await WaitForUrlAsync(startUrl, "Test 1 OK");
|
||||
|
||||
var pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 1."), "No index content after unlocking database with a expired JWT token.");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 1"), "No index content after unlocking database with a expired JWT token.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -30,10 +30,10 @@ public class UnlockTests : ClientPlaywrightTest
|
||||
await RefreshPageAndUnlockVault();
|
||||
|
||||
// Check if we get redirected back to the page we were trying to access.
|
||||
await WaitForUrlAsync(startUrl, "Test webapi call 1.");
|
||||
await WaitForUrlAsync(startUrl, "Test webapi call 1");
|
||||
|
||||
var pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 1."), "No index content after unlocking database.");
|
||||
Assert.That(pageContent, Does.Contain("Test 1 OK."), "No index content after unlocking database.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -69,9 +69,9 @@ public class UnlockTests : ClientPlaywrightTest
|
||||
await submitButton.ClickAsync();
|
||||
|
||||
// Check if we get redirected back to the page we were trying to access.
|
||||
await WaitForUrlAsync(startUrl, "Test webapi call 1.");
|
||||
await WaitForUrlAsync(startUrl, "Test webapi call 1");
|
||||
|
||||
var pageContent = await Page.TextContentAsync("body");
|
||||
Assert.That(pageContent, Does.Contain("Test webapi call 1."), "No index content after unlocking database.");
|
||||
Assert.That(pageContent, Does.Contain("Test 1 OK."), "No index content after unlocking database.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user