Skip to content
Draft
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 @@ -31,7 +31,9 @@ public void Issue10563OpenSwipeViewTest()
App.Tap(OpenLeftId);
// Wait for swipe animation to complete - the SwipeItem text becomes visible
App.WaitForElement("Issue 10563");
VerifyScreenshotOrSetException(ref exception, "Left_SwipeItems", retryTimeout: TimeSpan.FromSeconds(2));
// SwipeView animations can have timing variance - use retryTimeout (not tolerance)
// per UI testing guidelines which recommend retryTimeout for timing issues
VerifyScreenshotOrSetException(ref exception, "Left_SwipeItems", retryTimeout: TimeSpan.FromSeconds(3));
App.Tap(CloseId);
// Wait for close animation to complete - the SwipeItem text disappears
App.WaitForNoElement("Issue 10563");
Expand All @@ -40,23 +42,23 @@ public void Issue10563OpenSwipeViewTest()
App.WaitForElement(OpenRightId);
App.Tap(OpenRightId);
App.WaitForElement("Issue 10563");
VerifyScreenshotOrSetException(ref exception, "Right_SwipeItems", retryTimeout: TimeSpan.FromSeconds(2));
VerifyScreenshotOrSetException(ref exception, "Right_SwipeItems", retryTimeout: TimeSpan.FromSeconds(3));
App.Tap(CloseId);
App.WaitForNoElement("Issue 10563");

// Test Top SwipeItems
App.WaitForElement(OpenTopId);
App.Tap(OpenTopId);
App.WaitForElement("Issue 10563");
VerifyScreenshotOrSetException(ref exception, "Top_SwipeItems", retryTimeout: TimeSpan.FromSeconds(2));
VerifyScreenshotOrSetException(ref exception, "Top_SwipeItems", retryTimeout: TimeSpan.FromSeconds(3));
App.Tap(CloseId);
App.WaitForNoElement("Issue 10563");

// Test Bottom SwipeItems
App.WaitForElement(OpenBottomId);
App.Tap(OpenBottomId);
App.WaitForElement("Issue 10563");
VerifyScreenshotOrSetException(ref exception, "Bottom_SwipeItems", retryTimeout: TimeSpan.FromSeconds(2));
VerifyScreenshotOrSetException(ref exception, "Bottom_SwipeItems", retryTimeout: TimeSpan.FromSeconds(3));
App.Tap(CloseId);
App.WaitForNoElement("Issue 10563");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ public Issue18751(TestDevice device) : base(device)

[Test]
[Category(UITestCategories.CollectionView)]
public async Task Issue18751Test()
public void Issue18751Test()
{
VerifyInternetConnectivity();

App.WaitForElement("WaitForStubControl");

// Load images.
await Task.Delay(1000);

// The test passes if you are able to see the image, name, and location of each monkey.
VerifyScreenshot();
// CollectionView uses virtualization which loads images synchronously once items are visible.
// Unlike ListView (Issue18896) which may have variable height row rendering delays,
// CollectionView's image loading completes quickly so retryTimeout handles any timing variance.
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public async Task GradientImageButtonBackground()

App.WaitForElement("TestImageButton");

await Task.Yield(); // Wait for Ripple Effect animation to complete.
await Task.Yield(); // Ensure UI thread completes pending work

Thread.Sleep(1000);
VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2));
// Use retryTimeout to wait for ripple animation to complete
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ public void Issue18896Test()

App.ScrollUp(ListView);

// Load images and hide scrollbar.
Thread.Sleep(2000);

// 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));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public void ImageButtonAspectFitWorks()
App.WaitForElement("WaitForStubControl");
App.Tap("UpdateAspect");

Thread.Sleep(1000);
VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2));
// Use retryTimeout to wait for aspect change to render
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public Issue25192(TestDevice testDevice) : base(testDevice)
public void CarouselViewShouldRenderCorrectly()
{
App.WaitForElement("Item1");
Thread.Sleep(1000); // Wait for carouselView items loading
VerifyScreenshot();
// Use retryTimeout to wait for CarouselView items to fully load and render
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ public Issue27418(TestDevice device) : base(device) { }
public void CarouselItemsShouldRenderProperly()
{
App.WaitForElement("CarouselView");
#if WINDOWS
Thread.Sleep(2000); // Wait for scrollbar to disappear to avoid flaky test failures in CI
#endif
VerifyScreenshot();
// Use retryTimeout to wait for scrollbar to disappear on Windows
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(2));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ public void CellLayoutUpdatesCorrectlyAfterDeviceOrientationChanges()
{
App.WaitForElement("StubLabel");
App.SetOrientationLandscape();
Thread.Sleep(400);
VerifyScreenshot("Issue28657_Landscape");
// Use retryTimeout to wait for orientation change to complete
VerifyScreenshot("Issue28657_Landscape", retryTimeout: TimeSpan.FromSeconds(2));
App.SetOrientationPortrait();
Thread.Sleep(400);
VerifyScreenshot("Issue28657_Portrait");
VerifyScreenshot("Issue28657_Portrait", retryTimeout: TimeSpan.FromSeconds(2));
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public Issue30575(TestDevice device) : base(device) { }
public void WebViewShouldNotMirrored()
{
App.WaitForElement("WebViewLabel");
Thread.Sleep(3000);
VerifyScreenshot();
// Use retryTimeout to wait for WebView content to fully load
VerifyScreenshot(retryTimeout: TimeSpan.FromSeconds(3));
}
}
Loading