Skip to content

[test-quarantine] Stabilize and Unquarantine VirtualizationTest.AnchorMode_WindowScroll_HomeKeyJumpsToTop - #68338

Merged
ilonatommy merged 2 commits into
dotnet:mainfrom
surya3655:68225-test-quarantine
Aug 11, 2026
Merged

ilonatommy merged 2 commits into
dotnet:mainfrom
surya3655:68225-test-quarantine

Conversation

@surya3655

@surya3655 surya3655 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Stabilize and Unquarantine VirtualizationTest.AnchorMode_WindowScroll_HomeKeyJumpsToTop

Description

This PR addresses flakiness in

VirtualizationTest.AnchorMode_WindowScroll_HomeKeyJumpsToTop.

The test was previously quarantined due to intermittent failures in CI. Based on the stack trace, the failure occurs inside WindowScrollMidListAndWaitForRender(...), before the Home key assertion is reached.

The helper previously called window.scrollTo(0, 5000) once and then used Browser.True(...) only to retry checking whether window.scrollY > 4000. In CI/VM environments, Virtualize/layout can adjust or delay the window scroll after the initial scroll request, so the single scroll attempt may not leave the page at the expected mid-list position.

To make the test more resilient, the scroll request has been moved inside the retryable assertion delegate. This allows the test framework to retry both the scroll action and the scroll-position validation within the existing timeout, instead of retrying only the assertion.

Validation / Investigation

As part of the investigation:

  • The failure was observed in Linux CI artifacts.
  • The stack trace from the Linux run shows the failure occurs in
    WindowScrollMidListAndWaitForRender(...), before the Home key assertion.
  • The fix is based on that stack trace and targets the mid-list scroll setup,
    not the Home key behavior.

Changes

  • Moved window.scrollTo(0, 5000) inside the Browser.True(...) retry loop.
  • Ensured the test retries the scroll action until window.scrollY > 4000.
  • Kept the existing timeout unchanged.
  • Removed [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/68225")].

Test Output

After implementing the fix, I tested it with 100 iterations on Windows, and all test runs passed successfully. I also confirmed that the fix does not introduce any regressions or breaking changes on Windows.

image

Fixes #68225

@surya3655
surya3655 force-pushed the 68225-test-quarantine branch from ae5eee3 to 240d514 Compare August 11, 2026 06:11
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 11, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @surya3655. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@surya3655
surya3655 force-pushed the 68225-test-quarantine branch from 240d514 to 019ae64 Compare August 11, 2026 08:04
@surya3655
surya3655 marked this pull request as ready for review August 11, 2026 08:04
Copilot AI lite review requested due to automatic review settings August 11, 2026 08:04
@surya3655
surya3655 requested a review from a team as a code owner August 11, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 stabilizes the Components E2E test VirtualizationTest.AnchorMode_WindowScroll_HomeKeyJumpsToTop by making the “scroll to mid-list” setup more resilient to timing/layout variance (notably in CI/VM environments), then removes the quarantine attribute so the test runs normally again.

Changes:

  • Moves window.scrollTo(0, 5000) into the Browser.True(...) retry delegate in WindowScrollMidListAndWaitForRender, so the scroll action + validation are retried together within the existing timeout.
  • Keeps the existing scroll-position threshold check (scrollY > 4000) and timeout unchanged.
  • Removes [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/68225")] from AnchorMode_WindowScroll_HomeKeyJumpsToTop.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@ilonatommy

Copy link
Copy Markdown
Member

Test Output

After implementing the fix, I tested it with 100 iterations on Windows, and all test runs passed successfully. I also confirmed that the fix does not introduce any regressions or breaking changes on Windows.

Do I understand it right that before the fix it failed for you locally? If it didn't even once in 100 runs then 100 passing runs is not a proof that the fix it real.

@ilonatommy ilonatommy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change doesn't look harmful, in the worst case it will ge re-quarantined and we will have to take a 2nd look. I posted one concern about testing methodology above.

Thanks!

@ilonatommy ilonatommy added this to the 11.0-rc1 milestone Aug 11, 2026
@ilonatommy ilonatommy added area-blazor Includes: Blazor, Razor Components feature-blazor-virtualization This issue is related to the Blazor Virtualize component labels Aug 11, 2026
@ilonatommy
ilonatommy enabled auto-merge (squash) August 11, 2026 08:28
@surya3655

Copy link
Copy Markdown
Contributor Author

@ilonatommy You're correct. I was not able to reproduce the failure locally before the fix, as the issue only occurred in the Linux CI environment. My intention was to verify that the proposed change did not introduce any regressions and that the test remained stable during repeated executions on Windows. I'll update the test output and comments to clarify that the 100 successful runs validate the stability and safety of the change rather than proving that the root cause was fixed.

@ilonatommy

Copy link
Copy Markdown
Member

/ba-g Failures not connected, looks like infra issues.

@ilonatommy
ilonatommy merged commit 651fc25 into dotnet:main Aug 11, 2026
37 of 43 checks passed

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 019ae641 Deployed Aug 11, 2026 by ilonatommy via conclusion #836
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 community-contribution Indicates that the PR has been added by a community member feature-blazor-virtualization This issue is related to the Blazor Virtualize component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine VirtualizationTest.AnchorMode_WindowScroll_HomeKeyJumpsToTop

3 participants