Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
23 changes: 16 additions & 7 deletions src/Components/test/E2ETest/Tests/VirtualizationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<VirtualizationLargeOverscan>();
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<int> indices = null;
Browser.True(() =>
{
indices = GetVisibleItemIndices();
return indices.Count >= 200;
});

// Give focus so PageDown works
container.Click();
Expand All @@ -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();
Expand Down
Loading