Skip to content

[release/11.0] Stabilize Blazor Web JS initializer tests - #70488

Merged
wtgodbe merged 1 commit into
release/11.0from
wtgodbe/backport-js-initializers-release11
Nov 11, 2026
Merged

wtgodbe merged 1 commit into
release/11.0from
wtgodbe/backport-js-initializers-release11

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Nov 10, 2026

Copy link
Copy Markdown
Member

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.js resource 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:

  • Exact upstream additions/deletions, three-file scope, C# syntax, all initializer theory data, unchanged quarantine attributes, and git diff --check verified.
  • JavaScript module syntax, default/custom boot-loader handling, and all 16 streaming/WebAssembly/server/classic startup-flag combinations checked in isolation with Node.
  • E2E execution unavailable because pinned SDK 11.0.100-rc.3.26522.148 is not installed. These checks do not replace the real Components E2E suite; integration validation requires CI.

Backport of #70258. Preserve the release branch quarantine state.

(cherry picked from commit 0d7e878)

Co-authored-by: Copilot <[email protected]>
@wtgodbe
wtgodbe requested a review from a team as a code owner November 10, 2026 23:23
Copilot AI balanced review requested due to automatic review settings November 10, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

@PureWeen

Copy link
Copy Markdown
Member

/review

@wtgodbe wtgodbe added the tell-mode Indicates a PR which is being merged during tell-mode label Nov 11, 2026
@wtgodbe
wtgodbe merged commit 9e48b7d into release/11.0 Nov 11, 2026
39 checks passed
@wtgodbe
wtgodbe deleted the wtgodbe/backport-js-initializers-release11 branch November 11, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tell-mode Indicates a PR which is being merged during tell-mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants