Browse Source

Merge branch 'master' of https://github.com/xamarin/dev-days-labs

James Montemagno 10 năm trước cách đây
mục cha
commit
bb7e788985
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      Demos/MyWeather/MyWeather.UITests/Tests.cs

+ 3 - 2
Demos/MyWeather/MyWeather.UITests/Tests.cs

@@ -4,6 +4,7 @@ using System.Linq;
 using NUnit.Framework;
 using Xamarin.UITest;
 using Xamarin.UITest.Queries;
+using System.Threading;
 
 namespace MyWeather.UITests
 {
@@ -43,13 +44,13 @@ namespace MyWeather.UITests
 			app.Tap (x => x.Marked ("LabelUseCity"));//dismiss keyboard
 			app.Tap(x => x.Marked("ButtonGetWeather"));
 			app.Screenshot ("Click Get Weather");
-			app.WaitForElement (x => x.Marked ("IsBusyIndicator"));
+			Thread.Sleep (100);
 			app.Screenshot ("Is Loading");
 			app.WaitForNoElement (x => x.Marked ("IsBusyIndicator"));
 			app.Screenshot ("Done Loading");
 			app.WaitForElement (x => x.Marked ("LabelBigTemp"));
 			app.Screenshot ("Display Weather");
-			var results = app.Query (x => x.Marked ("LabelTempBig"));
+			var results = app.Query (x => x.Marked ("LabelBigTemp"));
 			int test = 0;
 			var passed = int.TryParse (results [0].Text.Replace("°", ""), out test);
 			Assert.IsTrue (passed, "Didn't Display Result");