feat(TestAutomation) Harass Calculator tests and Search box style fix

This commit is contained in:
2022-04-25 16:43:45 -04:00
parent 43d7391df2
commit 7c10149ff3
14 changed files with 445 additions and 98 deletions
+12 -11
View File
@@ -1,28 +1,29 @@
@implements IDisposable;
@inject ISearchService SearchService
@inject IJSRuntime JsRuntime
@inject ISearchService searchService
@inject IJSRuntime jsRuntime
<SearchDialogComponent></SearchDialogComponent>
@code {
private string test = "Q";
protected override void OnInitialized()
{
base.OnInitialized();
SearchService.Subscribe(OnUpdate);
searchService.Subscribe(OnUpdate);
}
protected override async Task OnInitializedAsync()
{
await SearchService.Load();
await JsRuntime.InvokeVoidAsync("SetDotnetReference", DotNetObjectReference.Create(this));
await searchService.Load();
await jsRuntime.InvokeVoidAsync("SetDotnetReference", DotNetObjectReference.Create(this));
}
void IDisposable.Dispose()
public void Dispose()
{
SearchService.Unsubscribe(OnUpdate);
searchService.Unsubscribe(OnUpdate);
}
void OnUpdate()
@@ -35,13 +36,13 @@
{
if (code.ToLower().Equals("k") && (ctrlKey || shiftKey || altKey || metaKey))
{
if (SearchService.IsVisible)
if (searchService.IsVisible)
{
SearchService.Hide();
searchService.Hide();
}
else
{
SearchService.Show();
searchService.Show();
}
}
}