Skip to content
Open
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
15 changes: 13 additions & 2 deletions src/Components/test/E2ETest/Tests/VirtualizationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2906,12 +2906,23 @@ public void AnchorMode_End_LargeAppendAtBottom_StillFollows(bool variableHeight,

Browser.True(() =>
{
js.ExecuteScript("arguments[0].scrollTop = arguments[0].scrollHeight", container);
var st = (long)js.ExecuteScript("return arguments[0].scrollTop", container);
var sh = (long)js.ExecuteScript("return arguments[0].scrollHeight", container);
var ch = (long)js.ExecuteScript("return arguments[0].clientHeight", container);
return sh - st - ch < 2;
}, TimeSpan.FromSeconds(30), "End mode: large append should still follow to bottom");
}, TimeSpan.FromSeconds(30), "End mode: large append should auto-follow to the new bottom without manual scrolling");

// The rows at the new bottom must materialize as real items (not async placeholders)
Browser.True(() =>
{
var maxIndex = (long)js.ExecuteScript(
"var els = arguments[0].querySelectorAll('.item[data-index]');" +
" var m = -1; for (var i = 0; i < els.length; i++) {" +
" var v = parseInt(els[i].getAttribute('data-index'), 10); if (v > m) { m = v; } } return m;",
container);
return maxIndex >= 1099;
}, TimeSpan.FromSeconds(30),
"End mode: real rows near the end of the list (index ~1099) should be visible at the bottom, not placeholders");
}

[Fact]
Expand Down
Loading