Broaden e2e coverage: pin 12 core behaviors (issue #112)#113
Merged
Conversation
Adds 12 Playwright .NET e2e tests covering compile/run core, examples, Reach<->HiDef profile switch, #code=/#snippet= URL round-trips, a cold-boot deep link, Monaco boot, IntelliSense completion, and embed mode — so a regression in any core path fails CI. Foundation smoke tests (#97/#90) are kept. Harness: extract E2ETestBase — host+browser+context shared in OneTimeSetUp, a fresh IPage per [SetUp] so a running game / set _canvasContextType can't leak across tests. SmokeTest now extends it. App changes are test hooks only (no behavior): data-testid on the Stop, Examples, Share, Assets buttons + example cards, share URL input, snippet toggle, diagnostics pane, and canvas; plus one GetInputDebugState JSInvokable debug hook for the sample-switch aliveness assertion. Cuts (no silent drops): #13 file-input asset load (no file <input>; drag-drop un-synthesizable), #14 shader compile (~17 MB DXC wasm, slow), #15 export zip (lowest value). Supersedes #95 (folded in as tests 4/5). Local run: 14/14 green in ~1.5 min. Closes #112 Closes #95 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename the e2e.yml 'Publish Blazor WASM app' step and the deploy.yml 'Publish' step so the overloaded word 'publish' can't be mistaken for a live deploy. The E2E step produces static output served locally to headless Chromium (test input, never leaves the runner); the deploy step is the real GitHub Pages publish. Kept the dotnet 'publish' verb in the names because Blazor WASM requires publish (not build) to lay out the _framework boot files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Widens the Playwright .NET e2e suite from 2 smoke tests to 14 in one PR, pinning the ~12 most important user-visible behaviors so a regression in any core path fails CI (issue #112). Not aiming for 100% coverage — "confident the basics work."
Tests added (
CoreBehaviorsTest.cs)CompileFingerprint)GetInputDebugStatehook)webgl↔webgl2(issue Shared canvas can't change WebGL context type — switching between Reach and HiDef games in one session crashes #25 canvas-swap path)#code=Share URL round-trip (reload restores identical source + runs)#snippet=Share URL round-trip (throughSnippetReverter/SnippetExpander)#code=deep link auto-runs (payload built with the realUrlCodec)GetCompletionsAsyncdirectly)?embed=truehides the editor + runs the gameHarness
E2ETestBase: host + browser + oneIBrowserContextshared inOneTimeSetUp; a freshIPageper test so a running game / set_canvasContextTypecan't leak across tests (context shared so the WASM payload stays cached).SmokeTestnow extends it.ProjectReferencetoXnaFiddle.Corefor deterministicUrlCodecpayloads.App-code changes — test hooks only, no behavior change
data-testidon: Stop, Examples, Share, Assets buttons; example cards (+data-example-name); the share URL input; snippet toggle; diagnostics pane; canvas.GetInputDebugStateJSInvokable ({ gameRunning, mouseX, mouseY, touchCount }) for the sample-switch aliveness assertion — the one hook the e2e-testing skill's boundary allows.Cuts (no silent drops)
<input>; drag-drop can't be synthesized headless..fxcompile — downloads ~17 MB DXC wasm, slow; keeps the e2e wall-clock sane (shader logic is unit-tested)..zip— lowest value (can't validate the zip builds in e2e).Notes
dotnet testauto-discovers the new tests — no workflow edit.e2e-testingupdated: per-test isolation, the fragment-only-navigation no-reload gotcha, and the new test hooks.Closes #112
Closes #95
🤖 Generated with Claude Code