Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

Remove IsElementStale method and use existing WebDriverExtensions.IsStale

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Address review feedback from #64542

Description

Removes duplicate IsElementStale methods and updates tests to use the existing IsStale extension method from WebDriverExtensions.cs.

  • Removed EnhancedNavigationTestUtil.IsElementStale() (duplicate of WebDriverExtensions.IsStale())
  • Removed unused private IsElementStale method from EnhancedNavigationTest.cs
  • Updated CanPerformNavigateToFromInteractiveEventHandler test to use originalNavElem.IsStale() extension method
// Before
Assert.Equal(shouldPreserveElements, !EnhancedNavigationTestUtil.IsElementStale(originalNavElem));

// After
Assert.Equal(shouldPreserveElements, !originalNavElem.IsStale());

Addresses feedback from #64542 (comment)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@dotnet-policy-service
Copy link
Contributor

Greetings! You've submitted a PR that modifies code that is shared with https://github.com/dotnet/runtime . Please make sure you synchronize this code with the changes in that repo!

Copilot AI changed the title [WIP] Remove IsElementStale method and update tests Remove IsElementStale method and use existing WebDriverExtensions.IsStale Nov 27, 2025
Copilot AI requested a review from ilonatommy November 27, 2025 13:11
Copilot finished work on behalf of ilonatommy November 27, 2025 13:11
@ilonatommy
Copy link
Member

@copilot, remove also the private IsElementStale from src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs

Copy link
Contributor Author

Copilot AI commented Nov 27, 2025

@copilot, remove also the private IsElementStale from src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs

Removed in 50d23df.

Copilot finished work on behalf of ilonatommy November 27, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants