mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-07 14:56:02 -04:00
Update DbPersistTest.cs (#98)
This commit is contained in:
@@ -168,7 +168,6 @@ public class LoginBase : OwningComponentBase
|
||||
var localStorageReturnUrl = await LocalStorage.GetItemAsync<string>("returnUrl");
|
||||
if (!string.IsNullOrEmpty(localStorageReturnUrl))
|
||||
{
|
||||
await LocalStorage.RemoveItemAsync("returnUrl");
|
||||
NavigationManager.NavigateTo(localStorageReturnUrl);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
// Check that encryption key is set. If not, redirect to unlock screen.
|
||||
if (!AuthService.IsEncryptionKeySet())
|
||||
{
|
||||
await LocalStorage.SetItemAsync(ReturnUrlKey, NavigationManager.Uri);
|
||||
NavigationManager.NavigateTo("/unlock");
|
||||
}
|
||||
|
||||
|
||||
@@ -186,6 +186,9 @@ public class PlaywrightTest
|
||||
/// <returns>Async task.</returns>
|
||||
protected async Task RefreshPageAndUnlockVault()
|
||||
{
|
||||
// Get current URL.
|
||||
var currentUrl = Page.Url;
|
||||
|
||||
// Hard refresh the page.
|
||||
await Page.ReloadAsync();
|
||||
|
||||
@@ -200,6 +203,9 @@ public class PlaywrightTest
|
||||
|
||||
var submitButton = Page.GetByRole(AriaRole.Button, new() { Name = "Unlock" });
|
||||
await submitButton.ClickAsync();
|
||||
|
||||
// Wait for the original page to load again.
|
||||
await WaitForURLAsync(currentUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DbPersistTest : PlaywrightTest
|
||||
await RefreshPageAndUnlockVault();
|
||||
|
||||
// Wait for the credentials page to load again.
|
||||
await WaitForURLAsync("**/credentials*");
|
||||
await WaitForURLAsync("**/credentials/**", serviceNameBefore);
|
||||
|
||||
// Check if the service name is still present in the content.
|
||||
pageContent = await Page.TextContentAsync("body");
|
||||
|
||||
Reference in New Issue
Block a user