Commit 23e7e44
test(blazor): Add Playwright E2E tests for navigation breadcrumbs (#4908)
* Update solution filters
* Fixing my mess
* test(blazor): Add Playwright E2E tests for navigation breadcrumbs
Add browser-level tests using Playwright to verify that navigation
breadcrumbs are created end-to-end in a real Blazor WebAssembly app.
The test navigates between pages, triggers SentrySdk.CaptureMessage,
intercepts the Sentry envelope via Playwright's route API, and verifies
the event contains navigation breadcrumbs with correct from/to paths.
Includes a minimal Blazor WASM test host app with a fake DSN.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Playwright test projects to solution and regenerate filters
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Increase Blazor WASM test app startup timeout to 120s
CI environments can be slow; 60s was not enough.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Improve test app startup: capture output, detect early exit, 180s timeout
- Capture stdout/stderr into a queue for diagnostics
- Detect early process exit and fail immediately with logs
- Increase timeout to 180s for slow CI environments
- Include process output in both error and timeout messages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove --no-build from dotnet run for test app
The Blazor WASM DevServer needs the staticwebassets.endpoints.json
manifest which is only generated during build of the project itself,
not when built from the solution level. Letting dotnet run build the
project ensures this manifest is generated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Install Playwright Chromium in test setup
CI doesn't have Playwright browsers pre-installed. Call
Program.Main(["install", "chromium"]) in InitializeAsync so the
test is self-contained. The download is cached, so subsequent
runs are a no-op.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Exclude Playwright tests from CI solution filters
Playwright requires browser binaries and system dependencies that
aren't available across all CI platforms (ARM64, musl). Exclude
the PlaywrightTests projects from all CI build filters. They remain
in local dev filters (SentryAspNetCore, SentryNoMobile, etc.)
and can be run manually or in a dedicated CI job later.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR review comments
- Fix JsonDocument leak: clone RootElement and dispose document
- Make _playwright/_browser nullable, null-check in DisposeAsync
- Close page after test to avoid resource leak
- Use using on TcpListener
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Playwright test projects to SLNX solution files
The base branch migrated from .sln to .slnx format. Update the new
solution files to include the Playwright test projects and fix
backslash path separators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: Add Playwright workflow for Blazor WASM E2E tests
Adds a lightweight CI workflow that runs the Blazor WebAssembly
Playwright tests. Only triggers on PRs that touch Blazor WASM,
core SDK, or ASP.NET Core code.
Uses a minimal setup (just .NET SDK + Chromium) instead of the
heavy shared environment action that installs Java, Android SDK,
Mono, etc.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 66923ef commit 23e7e44
22 files changed
Lines changed: 439 additions & 2 deletions
File tree
- .github/workflows
- scripts
- test
- Sentry.AspNetCore.Blazor.WebAssembly.PlaywrightTests.TestApp
- Pages
- wwwroot
- Sentry.AspNetCore.Blazor.WebAssembly.PlaywrightTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments