Add test for Blazor web app Error page rendering with [PersistentState]#66269
Open
Add test for Blazor web app Error page rendering with [PersistentState]#66269
Conversation
Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/be056767-fa7c-43c7-8f71-b1bf9e8fb444 Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
…ly test Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/be056767-fa7c-43c7-8f71-b1bf9e8fb444 Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/08b9bb0d-079e-4a97-a827-052d3db0e6d3 Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
akoeplinger
April 10, 2026 14:19
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an end-to-end Playwright test to the Blazor web app template test suite to validate that the /Error page renders successfully under Server interactivity, covering the [PersistentState]/RequestId regression scenario from #66245.
Changes:
- Add a new
BlazorWebTemplate_ErrorPage_RendersCorrectlyPlaywright test that navigates to/Errorand asserts expected headings and the presence of “Request ID”. - Add the necessary
Microsoft.Playwrightusing forWaitUntilStateusage in the new test.
…lateTest.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3 tasks
Contributor
|
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
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.
Description
Adds a new test
BlazorWebTemplate_ErrorPage_RendersCorrectlytoBlazorWebTemplateTest.csto verify the Error page in the Blazor web app template renders correctly.This test was requested as a review comment on PR #66245, which fixed
Error.razorby making theRequestIdpropertypublic. The[PersistentState]attribute requires a public getter — whenprivate,PersistentValueProviderComponentSubscription.PropertyGetterFactorywould throw:The test:
[PersistentState]is exercised across the prerender → circuit hydration boundary)/Errorvia Playwrighth1.text-dangerandh2.text-dangercontent[PersistentState]on the publicRequestIdproperty is functioning; a private property would throw before the page could renderChanges
src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs: NewBlazorWebTemplate_ErrorPage_RendersCorrectlytest