fix: cross-platform integration test failures for macOS and Firefox - #427
Merged
BenjaminMichaelis merged 1 commit intoAug 12, 2026
Conversation
- ClearMonacoEditor: use ControlOrMeta+a instead of Control+a so that Select All works on macOS (where Ctrl+A moves cursor instead of selecting) - PlaywrightTestBase.NewPageAsync: raise default navigation timeout to 90 s to give Firefox time to reach NetworkIdle while loading Blazor WASM - EditorTests diagnostics test: filter out the empty setMarkers([]) call that Monaco fires before actual diagnostic markers arrive, and extend the post-receive settle delay from 1 s to 3 s Co-authored-by: BenjaminMichaelis <[email protected]>
Copilot created this pull request from a session on behalf of
BenjaminMichaelis
August 12, 2026 17:50
View session
BenjaminMichaelis
marked this pull request as ready for review
August 12, 2026 18:01
There was a problem hiding this comment.
Pull request overview
This PR addresses cross-platform Playwright integration test flakiness/failures by making editor interactions and diagnostic waits more resilient across macOS and Firefox.
Changes:
- Update Monaco editor clearing to use
ControlOrMeta+aso “Select All” works on macOS and non-macOS platforms. - Increase Playwright navigation timeout to reduce Firefox load-state timeouts while Blazor WASM finishes loading.
- Make the diagnostics console-message wait ignore the initial
setMarkers([])clear call and increase the settle delay.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Microsoft.TryDotNet.IntegrationTests/PlaywrightTestBase.cs |
Sets a longer default navigation timeout for pages created by the integration tests. |
src/Microsoft.TryDotNet.IntegrationTests/PageExtensions.cs |
Fixes cross-platform Monaco editor clearing by using ControlOrMeta shortcuts. |
src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs |
Improves diagnostic marker waiting by filtering out empty setMarkers([]) and increasing the post-log wait window. |
Suppressed comments (1)
src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs:355
- Using a fixed Task.Delay plus
IsVisibleAsync()(without checking the returned bool) doesn’t reliably wait for the squiggly marker to render before the screenshot, and won’t fail if it never becomes visible. Prefer waiting on the selector becoming visible (which throws on timeout) instead of a hard sleep.
await Task.Delay(TimeSpan.FromSeconds(3));
var diagnosticMarker = page.Locator("div .squiggly-error");
await diagnosticMarker.IsVisibleAsync();
await page.TestScreenShotAsync();
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
34
to
+38
| 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; |
BenjaminMichaelis
merged commit Aug 12, 2026
e41fc7a
into
bmichaelis/MatrixIntegrationTests
12 of 13 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three distinct root causes were breaking matrix integration tests on macOS (both browsers) and Firefox (ubuntu + windows).
macOS — all code-execution tests fail
ClearMonacoEditorusedControl+A, which on macOS is Monaco's Emacs "move to line start" binding, not "Select All". The editor was never cleared; old code remained; combined source failed to compile; every execution test returnedRunCompleted: "Failed".Firefox —
WaitForLoadStateAsync(NetworkIdle)timeoutsPlaywright's 30 s default navigation timeout isn't enough for Firefox loading the Blazor WASM runtime. Raises it to 90 s in
NewPageAsync().Windows/Firefox — diagnostics test captures empty
setMarkerscallMonaco fires
setMarkers([])to clear previous markers before firingsetMarkers([{error}])with actual diagnostics. The predicate was resolving on the empty call; the 1 s settle delay was too short for real markers to arrive.Settle delay also increased from 1 s → 3 s.