Repository navigation
[release/11.0] Stabilize Blazor Web JS initializer tests - #70488
Merged
Merged
Conversation
Backport of #70258. Preserve the release branch quarantine state. (cherry picked from commit 0d7e878) Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Release/11.0 Components E2E CI results are needed to validate browser-startup ordering, module loading, and resource-timing behavior that source inspection and upstream results cannot establish on this branch.
No open issues 🎉
What changed in this PR
Backports the Blazor JavaScript initializer test stabilization to release/11.0, moving startup flags into the initial URL to avoid timing races.
Changes:
- Reads initializer test flags before Blazor startup instead of setting session storage after navigation.
- Adds a default WebAssembly boot-resource mapping without overriding custom loaders.
- Checks that modern WebAssembly initialization loads
WasmMinimal/_framework/dotnet.js, while preserving existing quarantine attributes.
Browser integration validation remains pending CI; the reported isolated checks do not replace the Components E2E suite.
| File | Description |
|---|---|
| src/Components/test/testassets/Components.TestServer/wwwroot/Components.TestServer.lib.module.js | Supplies the default WebAssembly boot-resource mapping. |
| src/Components/test/testassets/Components.TestServer/RazorComponents/App.razor | Reads startup flags from query parameters, retaining the classic initializer session-storage fallback. |
| src/Components/test/E2ETest/ServerRenderingTests/BlazorWebJsInitializersTest.cs | Passes flags in initial URLs, removes the storage-based helper, and asserts the expected boot-resource URL. |
Review effort: Balanced
Member
|
/review |
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.
Backport of #70258 to
release/11.0.Set initializer startup flags in the initial URL, before Blazor startup, rather than racing startup with a later session-storage write. Supply the test app's WebAssembly boot-resource mapping and assert that the correct
WasmMinimal/_framework/dotnet.jsresource was loaded.The thirty-day PR audit found modern-initializer failures in at least nine release/11.0 builds. Git's three-way cherry-pick resolves the differing branch context without manual code edits. Preserve the existing modern-test quarantine and leave the classic test unquarantined, matching the release branch.
Validation:
git diff --checkverified.11.0.100-rc.3.26522.148is not installed. These checks do not replace the real Components E2E suite; integration validation requires CI.