Skip to content

Commit 89889e7

Browse files
Further attempt to fix CancelsOutdatedRefreshes_Async in CI (#32998)
1 parent 912e07c commit 89889e7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Components/test/E2ETest/Tests/VirtualizationTest.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ public void RerendersWhenItemSizeShrinks_Async()
169169
}
170170

171171
[Fact]
172-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/25929")]
173172
public void CancelsOutdatedRefreshes_Async()
174173
{
175174
Browser.MountTestComponent<VirtualizationComponent>();
176175
var cancellationCount = Browser.Exists(By.Id("cancellation-count"));
177176
var finishLoadingButton = Browser.Exists(By.Id("finish-loading-button"));
177+
var js = (IJavaScriptExecutor)Browser;
178178

179179
// Load the initial set of items.
180180
finishLoadingButton.Click();
@@ -183,7 +183,12 @@ public void CancelsOutdatedRefreshes_Async()
183183
Browser.Equal("0", () => cancellationCount.Text);
184184

185185
// Validate that scrolling causes cancellations
186-
Browser.ExecuteJavaScript("document.getElementById('async-container').scrollTo({ top:5000, behavior:'smooth' })");
186+
for (var y = 1000; y <= 5000; y += 1000)
187+
{
188+
js.ExecuteScript($"document.getElementById('async-container').scrollTo({{ top: {y} }})");
189+
Browser.Equal(y, () => (long)js.ExecuteScript("return document.getElementById('async-container').scrollTop"));
190+
}
191+
187192
Browser.True(() => int.Parse(cancellationCount.Text, CultureInfo.InvariantCulture) > 0);
188193
}
189194

0 commit comments

Comments
 (0)