summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core.iOS.UITests')
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs
index 4d7ec9d0..ca275c81 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs
+++ b/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs
@@ -113,8 +113,16 @@ namespace Xamarin.Forms.Core.UITests
App.Screenshot("All ImageCells are present");
- await Task.Delay(1000);
- var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
+ int numberOfImages = 0;
+
+ // Most of the time, 1 second is long enough to wait for the images to load, but depending on network conditions
+ // it may take longer
+ for (int n = 0; n < 30; n++)
+ {
+ await Task.Delay(1000);
+ numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
+ }
+
// Check that there are images present. In Android,
// have to make sure that there are more than 2 for navigation.
Assert.IsTrue(numberOfImages > 2);