Skip to content

feat: Matrix integration tests - #98

Open
BenjaminMichaelis wants to merge 8 commits into
mainfrom
bmichaelis/MatrixIntegrationTests
Open

feat: Matrix integration tests#98
BenjaminMichaelis wants to merge 8 commits into
mainfrom
bmichaelis/MatrixIntegrationTests

Conversation

@BenjaminMichaelis

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 21, 2026 18:28
@BenjaminMichaelis BenjaminMichaelis self-assigned this Feb 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces cross-platform and cross-browser matrix testing for integration tests. The key objectives are to enable comprehensive testing across Windows, Linux, and macOS operating systems using Chromium, Firefox, and WebKit browsers, and to properly separate integration tests from unit tests in the CI/CD pipeline.

Changes:

  • Updated npm registry configuration across multiple packages to use the public npmjs.org registry
  • Added matrix testing strategy to GitHub Actions workflow for integration tests across 3 operating systems and 3 browsers (9 total combinations)
  • Enhanced PlaywrightSession to support browser selection via parameter or environment variable
  • Added [Trait("TestType", "Integration")] to integration test classes to enable test filtering
  • Removed Linux-specific test skipping logic from IntegrationTestFactAttribute
  • Updated deployment configuration with new Azure Container Registry secret names

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/microsoft-trydotnet/.npmrc Changed npm registry from Azure DevOps to public npmjs.org
src/microsoft-trydotnet-styles/.npmrc Changed npm registry from Azure DevOps to public npmjs.org
src/microsoft-trydotnet-editor/.npmrc Changed npm registry from Azure DevOps to public npmjs.org
src/microsoft-learn-mock/.npmrc Changed npm registry from Azure DevOps to public npmjs.org
src/Microsoft.TryDotNet.IntegrationTests/WasmRunnerTests.cs Added Integration trait for test filtering
src/Microsoft.TryDotNet.IntegrationTests/TryDotNetJsIntegrationTests.cs Added Integration trait for test filtering
src/Microsoft.TryDotNet.IntegrationTests/PlaywrightSession.cs Added multi-browser support with environment variable and parameter-based browser selection
src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj Added global using for Xunit and removed trailing whitespace
src/Microsoft.TryDotNet.IntegrationTests/IntegrationTestFactAttribute.cs Removed Linux-specific test skipping to enable cross-platform testing
src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs Added Integration trait for test filtering
.github/workflows/Build-Test-And-Deploy.yaml Added matrix testing strategy, updated test filters, changed ACR secret names
.github/actions/setup-dotnet/action.yml Added configurable build configuration parameter (Release/Debug)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/Build-Test-And-Deploy.yaml Outdated
Comment thread .github/workflows/Build-Test-And-Deploy.yaml Outdated
Comment thread src/Microsoft.TryDotNet.IntegrationTests/PlaywrightSession.cs Outdated
Comment thread .github/workflows/Build-Test-And-Deploy.yaml Outdated
Comment thread .github/workflows/Build-Test-And-Deploy.yaml
Comment thread .github/workflows/Build-Test-And-Deploy.yaml Outdated
Comment thread src/Microsoft.TryDotNet.IntegrationTests/PlaywrightSession.cs Outdated
…427)

Three distinct root causes were breaking matrix integration tests on
macOS (both browsers) and Firefox (ubuntu + windows).

## macOS — all code-execution tests fail
`ClearMonacoEditor` used `Control+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 returned `RunCompleted: "Failed"`.

```csharp
// Before
await editor.PressAsync("Control+a");
// After — Playwright sends Cmd+A on macOS, Ctrl+A elsewhere
await editor.PressAsync("ControlOrMeta+a");
```

## Firefox — `WaitForLoadStateAsync(NetworkIdle)` timeouts
Playwright's 30 s default navigation timeout isn't enough for Firefox
loading the Blazor WASM runtime. Raises it to 90 s in `NewPageAsync()`.

```csharp
page.SetDefaultNavigationTimeout(90_000f);
```

## Windows/Firefox — diagnostics test captures empty `setMarkers` call
Monaco fires `setMarkers([])` to clear previous markers *before* firing
`setMarkers([{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.

```csharp
// Skip the empty clear-call; wait for actual diagnostic data
Predicate = message => message.Text.Contains("[MonacoEditorAdapter.setMarkers]")
                    && !message.Text.Contains(": []"),
```
Settle delay also increased from 1 s → 3 s.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants