wait for test to finish so it doesn't break later tests (#6562)

This commit is contained in:
Shane Neuville 2019-06-18 04:21:30 -06:00 коммит произвёл Rui Marinho
Родитель a169cf7f69
Коммит 2ca5467e3b
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -75,6 +75,7 @@ namespace Xamarin.Forms.Controls.Issues
lst.RefreshCommand = new Command(async () => lst.RefreshCommand = new Command(async () =>
{ {
var newitems = new List<string>(); var newitems = new List<string>();
newitems.Add("data refreshed");
await Task.Delay(5000); await Task.Delay(5000);
for (int i = 0; i < 1000; i++) for (int i = 0; i < 1000; i++)
{ {
@ -98,7 +99,13 @@ namespace Xamarin.Forms.Controls.Issues
[Test] [Test]
public void TestIssue1905RefreshShows() public void TestIssue1905RefreshShows()
{ {
// wait for test to load
RunningApp.WaitForElement("btnRefresh");
RunningApp.Screenshot("Should show refresh control"); RunningApp.Screenshot("Should show refresh control");
// wait for test to finish so it doesn't keep working
// in the background and break the next test
RunningApp.WaitForElement("data refreshed");
} }
#endif #endif
} }