Skip to content

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Sep 5, 2025

It was done to main branch as well. The pass rate without this PR is 20%. This PR checks if just backporting the assert fix is enough or was there a bigger framework fix between ne9 and ne8. After 6 runs the failure was not reproduced. If it's not fully fixed then at least it significantly improved the pass rate.

It used to have 0% pass rate before this PR. With the fix, it did not fail yet.

@dotnet-policy-service dotnet-policy-service bot added this to the 8.0.x milestone Sep 5, 2025
@ilonatommy ilonatommy changed the title Make the flaky test wait for the conditon to be true. Use wait assert in flaky RadioButtonGetsResetAfterSubmittingEnhancedForm Sep 5, 2025
@ilonatommy
Copy link
Member Author

1st attempt: it did not fail but we are hitting #61143, that might get fixed by #63564. In the meantime, rerunning.

@ilonatommy
Copy link
Member Author

ilonatommy commented Sep 8, 2025

2nd attempt: fine but NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWebAssembly is still failing and at the same time, RadioButtonGetsResetAfterSubmittingEnhancedForm is failing on the PR that tries to fix NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWebAssembly. I will merge both fixes and run them a bit few more times on the same CI.

@ilonatommy
Copy link
Member Author

ilonatommy commented Sep 8, 2025

/azp run

(3rd attempt: fine)

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Sep 8, 2025
@ilonatommy ilonatommy marked this pull request as ready for review September 8, 2025 10:04
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 10:04
@ilonatommy ilonatommy requested a review from a team as a code owner September 8, 2025 10:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports a fix for flaky end-to-end tests by replacing immediate Assert calls with WaitAssert and Browser.True() methods to handle timing issues in web UI interactions. The changes specifically target tests that were experiencing low pass rates (20% and 0%) due to race conditions between UI state changes and assertions.

Key changes:

  • Replace immediate assertions with wait-based assertions in form handling tests
  • Update navigation tests to use browser-specific assertion methods with proper timing

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
FormWithParentBindingContextTest.cs Converts Assert.True/False calls to WaitAssert.True/False for radio button and checkbox state verification
EnhancedNavigationTest.cs Replaces Assert.EndsWith with Browser.True() for URI validation with proper wait handling

@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label Sep 8, 2025
@ilonatommy ilonatommy self-assigned this Sep 8, 2025
@ilonatommy ilonatommy added the tell-mode Indicates a PR which is being merged during tell-mode label Sep 8, 2025
@ilonatommy ilonatommy changed the title Use wait assert in flaky RadioButtonGetsResetAfterSubmittingEnhancedForm [release/8.0] Use wait assert in flaky RadioButtonGetsResetAfterSubmittingEnhancedForm Sep 8, 2025
@ilonatommy
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@ilonatommy
Copy link
Member Author

Not related tests in aspnetcore-ci are failing consequently with #63582.

@ilonatommy ilonatommy changed the title [release/8.0] Use wait assert in flaky RadioButtonGetsResetAfterSubmittingEnhancedForm [release/8.0] Use wait assert in flaky tests Sep 8, 2025
@wtgodbe wtgodbe merged commit 3969687 into dotnet:release/8.0 Sep 8, 2025
25 checks passed
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.21 Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components 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.

3 participants