Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 10, 2025

Backport of #63583 to release/10.0

/cc @oroztocil

Fix NavMenuHighlightsCurrentLocation in headless mode

Fixes E2E browser test in headless mode.

Description

The Blazor E2E test NavMenuHighlightsCurrentLocation is failing in CI and when run locally without debugger. The reason is that in the headless mode the window width is too small and the sidebar UI is hidden. This causes visibility-sensitive properties such as IWebElement.Text to return empty strings for hidden elements from the sidebar, causing assertions to fail.

The PR:

  • Fixes the test by explicitly setting the window size for particular test.
  • Adds a mechanism for resetting the window size between individual tests to prevent unexpected dependencies between tests in the future.

Fixes #54497

Customer Impact

The change increases the test coverage of our code.

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

Risk

  • High
  • Medium
  • Low

Does not impact shipped code.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.3

  • Make necessary changes in eng/PatchConfig.props

@github-actions github-actions bot requested a review from a team as a code owner September 10, 2025 12:37
@oroztocil oroztocil added area-blazor Includes: Blazor, Razor Components tell-mode Indicates a PR which is being merged during tell-mode labels Sep 10, 2025
@wtgodbe
Copy link
Member

wtgodbe commented Sep 10, 2025

Failing test should be quarantined - #63624

@wtgodbe wtgodbe merged commit d7d22df into release/10.0 Sep 10, 2025
25 of 28 checks passed
@wtgodbe wtgodbe deleted the backport/pr-63583-to-release/10.0 branch September 10, 2025 18:30
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-rc2 milestone Sep 10, 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.

2 participants