Skip to content

Conversation

dariatiurina
Copy link
Contributor

@dariatiurina dariatiurina commented Aug 21, 2025

Re-enable FormWithParentBindingContextTest.CanUseFormWithMethodGet

Description

This pull request re-enables FormWithParentBindingContextTest.CanUseFormWithMethodGet by refactoring the test coverage for form handling with browser back/forward navigation by moving the relevant test from FormWithParentBindingContextTest to a new dedicated test class, FormWithNoBackForwardCacheTest. Additionally, it introduces a new browser context and configuration to ensure correct browser behavior for these tests.

Changes

  • The CanUseFormWithMethodGet test has been removed from FormWithParentBindingContextTest and added to a new file and class, FormWithNoBackForwardCacheTest with different browser context.
  • Added a new browser context constant, BackForwardCacheContext, to BrowserFixture for tests needing control over Chrome's back/forward cache.

Reasoning behind changes:

In the recent changes in Chrome the Back/forward cache is now enabled by default. Due to this autocomplete="off" is not working correctly in the test. The new created ServerFixtureContext that disables this default behaviour in Chrome.

Fixes #61882

@dariatiurina dariatiurina self-assigned this Aug 21, 2025
@github-actions github-actions bot added the area-blazor Includes: Blazor, Razor Components label Aug 21, 2025
@dariatiurina dariatiurina marked this pull request as ready for review August 21, 2025 09:01
@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 09:01
@dariatiurina dariatiurina requested a review from a team as a code owner August 21, 2025 09:01
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 pull request re-enables a previously quarantined test by creating a new test class with specialized browser configuration to handle Chrome's back/forward cache behavior. The test CanUseFormWithMethodGet was moved from FormWithParentBindingContextTest to a new dedicated class FormWithNoBackForwardCacheTest with proper browser context configuration.

  • Introduces a new browser context BackForwardCacheContext that disables Chrome's back/forward cache
  • Moves the quarantined test to a new test class with the specialized browser configuration
  • Re-enables the test with both enhanced navigation scenarios (true/false)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
BrowserFixture.cs Adds new browser context constant and Chrome argument to disable back/forward cache
FormWithParentBindingContextTest.cs Removes the quarantined test method CanUseFormWithMethodGet
FormWithNoBackForwardCacheTest.cs New test class containing the moved test with specialized browser context

@ilonatommy ilonatommy added this to the 10.0-rc2 milestone Aug 21, 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 test-fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarantine FormWithParentBindingContextTest.CanUseFormWithMethodGet
2 participants