From f22369c6a2a1175543b3192d37552dde6261caba Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Tue, 7 Jul 2026 17:07:43 +0200 Subject: [PATCH 1/2] Fix auto-follow E2E test logic. --- .../test/E2ETest/Tests/VirtualizationTest.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs index 6ecc762a8614..89172d16f992 100644 --- a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs +++ b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs @@ -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 >= 1090; + }, TimeSpan.FromSeconds(30), + "End mode: real rows near the end of the list (index ~1099) should be visible at the bottom, not placeholders"); } [Fact] From e6a2def09110d1cfa7085b7338cece833b533873 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:04:50 +0200 Subject: [PATCH 2/2] Correct a typo Last row of 1k item 0-indexed list, after appending 100 items is 1099, not 1090. --- src/Components/test/E2ETest/Tests/VirtualizationTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs index 89172d16f992..5c181343b4b5 100644 --- a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs +++ b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs @@ -2920,7 +2920,7 @@ public void AnchorMode_End_LargeAppendAtBottom_StillFollows(bool variableHeight, " 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 >= 1090; + 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"); }