Update ImageCellListPage to use an image we control;

Update CellsGalleryImageUrlCellList test to wait longer than 1s for images
to load if necessary
This commit is contained in:
E.Z. Hart 2016-12-28 16:42:17 -07:00
Родитель 31397e59cc
Коммит cf496381ce
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 1196DD903A2F7606
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -94,7 +94,7 @@ namespace Xamarin.Forms.Controls
var albums = new List<string> ();
for (int i = 0; i < 30; i++) {
albums.Add (string.Format ("http://cdn.instructables.com/FCP/9TOJ/GCJ0ZQV5/FCP9TOJGCJ0ZQV5.MEDIUM.jpg?ticks={0}",i ));
albums.Add (string.Format ("https://raw.githubusercontent.com/xamarin/Xamarin.Forms/master/Xamarin.Forms.Controls/coffee.png?ticks={0}", i ));
}

Просмотреть файл

@ -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);