diff --git a/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs b/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs index 13c5c36bcea9..04996f83b507 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs @@ -104,10 +104,6 @@ public ServerVirtualizationTest(BrowserFixture browserFixture, ToggleExecutionMo public override void CanRenderHtmlTable() => base.CanRenderHtmlTable(); - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/65962")] - public override void CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax() - => base.CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax(); - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/66119")] public override void NonZeroStartIndex_ScrollToMiddleThenMeasure() => base.NonZeroStartIndex_ScrollToMiddleThenMeasure(); diff --git a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs index bc0560a65671..04008110251d 100644 --- a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs +++ b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs @@ -611,14 +611,18 @@ public void EmptyContentRendered_Async() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/65852")] - public virtual void CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax() + public void CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax() { Browser.MountTestComponent(); var container = Browser.Exists(By.Id("virtualize-large-overscan")); - // Ensure we have an initial contiguous batch and the elevated effective max has kicked in (>= OverscanCount) - var indices = GetVisibleItemIndices(); - Browser.True(() => indices.Count >= 200); + // Wait for the elevated effective max to kick in (>= OverscanCount). + // Re-query inside the retry loop so we see new items as they render. + List indices = null; + Browser.True(() => + { + indices = GetVisibleItemIndices(); + return indices.Count >= 200; + }); // Give focus so PageDown works container.Click(); @@ -633,8 +637,13 @@ public virtual void CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax() var scrollTop = (long)js.ExecuteScript("return arguments[0].scrollTop", container); while (scrollTop + clientHeight < scrollHeight) { - // Validate contiguity on the current page - Browser.True(() => IsCurrentViewContiguous(indices)); + // Re-query visible items after each scroll so contiguity and + // progress checks reflect the current DOM state. + Browser.True(() => + { + indices = GetVisibleItemIndices(); + return IsCurrentViewContiguous(indices); + }); // Track progress in indices var currentMax = indices.Max();