Skip to content

Commit

Permalink
Switch to extra wait
Browse files Browse the repository at this point in the history
  • Loading branch information
msmithNI committed Oct 27, 2024
1 parent 91715ad commit 1c03305
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ function registerNimbleEvents(Blazor) {
}

function handleRuntimeStarted() {
window.requestAnimationFrame(() => {
window.NimbleBlazor.hasRuntimeStarted = true;
});
window.NimbleBlazor.hasRuntimeStarted = true;
}

// Blazor Web Apps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export function registerSprightEvents(Blazor) {
}

function handleRuntimeStarted() {
window.requestAnimationFrame(() => {
window.NimbleBlazor.hasRuntimeStarted = true;
});
window.NimbleBlazor.hasRuntimeStarted = true;
}

// Blazor Web Apps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ private async Task NavigateToPageAsync(IPage page, string route)
private async Task WaitForComponentsInitializationAsync(IPage page)
{
await page.WaitForFunctionAsync(ComponentLibraryInitializationTestJavaScript);
// Have encountered some test intermittency when interacting with the components immediately
// after the JS scripts report ready. Added an extra wait here to mitigate.
await Task.Delay(150);
}

protected sealed class AsyncDisposablePage : IAsyncDisposable
Expand Down

0 comments on commit 1c03305

Please sign in to comment.