зеркало из https://github.com/DeGsoft/maui-linux.git
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:
Родитель
31397e59cc
Коммит
cf496381ce
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче