From d84e4da3420b6c9fed7f031351769b6903a65c67 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 23:46:35 +0200 Subject: [PATCH] [Testing] Replace retryDelay with retryTimeout in UI tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace retryDelay with retryTimeout in Issue18751 and Issue18896 UI tests. - Issue18751: retryDelay→retryTimeout + CollectionView timing comment - Issue18896: retryDelay→retryTimeout (2s→3s) + ListView timing comment Supersedes #33809. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../TestCases.Shared.Tests/Tests/Issues/Issue18751.cs | 6 +++--- .../TestCases.Shared.Tests/Tests/Issues/Issue18896.cs | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.cs index e6c9dd9c7e78..564720496976 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.cs @@ -17,8 +17,8 @@ public Issue18751(TestDevice device) : base(device) public void Issue18751Test() { App.WaitForElement("WaitForStubControl"); - // Load images and hide scrollbar. - // The test passes if you are able to see the image, name, and location of each monkey. - VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2)); + // CollectionView uses virtualization which loads images synchronously once items are visible. + // Use retryTimeout to adaptively wait for any timing variance. + VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2)); } } \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs index da47d776bdb0..84776ca17834 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs @@ -26,8 +26,9 @@ public void Issue18896Test() #else App.ScrollUp(ListView); #endif - // Load images and hide scrollbar. - // The test passes if you are able to see the image, name, and location of each monkey. - VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2)); + // ListView with HasUnevenRows may have variable height row rendering that requires + // additional time for images to load and scrollbar to disappear. + // Use retryTimeout to adaptively wait for the UI to stabilize. + VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(3)); } } \ No newline at end of file