Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,13 @@ await editor.PressSequentiallyAsync(@"/////////////////////////

}, new PageRunAndWaitForConsoleMessageOptions()
{
Predicate = message => message.Text.Contains("[MonacoEditorAdapter.setMarkers]"),
// Skip the initial empty setMarkers([]) call that Monaco fires to clear previous
// markers; wait for a non-empty call that actually contains diagnostic data.
Predicate = message => message.Text.Contains("[MonacoEditorAdapter.setMarkers]") && !message.Text.Contains(": []"),
Timeout = Debugger.IsAttached ? 0.0f : (float)TimeSpan.FromMinutes(10).TotalMilliseconds
});

await Task.Delay(TimeSpan.FromSeconds(1));
await Task.Delay(TimeSpan.FromSeconds(3));

var diagnosticMarker = page.Locator("div .squiggly-error");
await diagnosticMarker.IsVisibleAsync();
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TryDotNet.IntegrationTests/PageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public static async Task ClearMonacoEditor(this IPage page)
var editor = page.Locator(@"textarea[role = ""textbox""]");
await editor.IsVisibleAsync();
await editor.FocusAsync();
await editor.PressAsync("Control+a");
// Use ControlOrMeta+a so the shortcut works on both macOS (Cmd+A) and other platforms (Ctrl+A).
await editor.PressAsync("ControlOrMeta+a");
await editor.PressAsync("Delete");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ protected PlaywrightTestBase(
protected async Task<IPage> NewPageAsync()
{
var playwright = await Services.GetPlaywrightAsync();
return await playwright.Browser.NewPageAsync();
var page = await playwright.Browser.NewPageAsync();
// Firefox needs more time to reach NetworkIdle due to Blazor WASM loading.
page.SetDefaultNavigationTimeout(90_000f);
return page;
Comment on lines 34 to +38
}

protected async Task<Uri> TryDotNetUrlAsync()
Expand Down
Loading