зеркало из https://github.com/DeGsoft/maui-linux.git
[Tests] Fix UITests that are failing on API 19 android (#1129)
* [Tests] use back for picker tests on Android * [Tests] See if waiting fixes issues with failing uitest
This commit is contained in:
Родитель
c1bab7c9e2
Коммит
15fbdc80f0
|
@ -44,15 +44,12 @@ namespace Xamarin.Forms.Controls.Issues
|
||||||
public void DatePickerCancelShouldUnfocus()
|
public void DatePickerCancelShouldUnfocus()
|
||||||
{
|
{
|
||||||
RunningApp.Tap(q => q.Marked(DatePicker));
|
RunningApp.Tap(q => q.Marked(DatePicker));
|
||||||
RunningApp.WaitForElement(q => q.Marked("Cancel"));
|
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Cancel"));
|
RunningApp.Back();
|
||||||
RunningApp.WaitForElement(q => q.Marked("Click to focus DatePicker"));
|
RunningApp.WaitForElement(q => q.Marked("Click to focus DatePicker"));
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Click to focus DatePicker"));
|
RunningApp.Tap(q => q.Marked("Click to focus DatePicker"));
|
||||||
RunningApp.WaitForElement(q => q.Marked("Cancel"));
|
RunningApp.Back();
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Cancel"));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -44,15 +44,12 @@ namespace Xamarin.Forms.Controls.Issues
|
||||||
public void TimePickerCancelShouldUnfocus()
|
public void TimePickerCancelShouldUnfocus()
|
||||||
{
|
{
|
||||||
RunningApp.Tap(q => q.Marked(TimePicker));
|
RunningApp.Tap(q => q.Marked(TimePicker));
|
||||||
RunningApp.WaitForElement(q => q.Marked("Cancel"));
|
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Cancel"));
|
RunningApp.Back();
|
||||||
RunningApp.WaitForElement(q => q.Marked("Click to focus TimePicker"));
|
RunningApp.WaitForElement(q => q.Marked("Click to focus TimePicker"));
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Click to focus TimePicker"));
|
RunningApp.Tap(q => q.Marked("Click to focus TimePicker"));
|
||||||
RunningApp.WaitForElement(q => q.Marked("Cancel"));
|
RunningApp.Back();
|
||||||
|
|
||||||
RunningApp.Tap(q => q.Marked("Cancel"));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -67,13 +67,15 @@ namespace Xamarin.Forms.Controls.Issues
|
||||||
// These controls show a pop-up which we have to cancel/done out of before we can continue
|
// These controls show a pop-up which we have to cancel/done out of before we can continue
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
var cancelButtonText = "Cancel";
|
var cancelButtonText = "Cancel";
|
||||||
|
RunningApp.Back();
|
||||||
#elif __IOS__
|
#elif __IOS__
|
||||||
var cancelButtonText = "Done";
|
var cancelButtonText = "Done";
|
||||||
|
RunningApp.WaitForElement(q => q.Marked(cancelButtonText));
|
||||||
|
RunningApp.Tap(q => q.Marked(cancelButtonText));
|
||||||
#else
|
#else
|
||||||
var cancelButtonText = "X";
|
var cancelButtonText = "X";
|
||||||
#endif
|
#endif
|
||||||
RunningApp.WaitForElement(q => q.Marked(cancelButtonText));
|
|
||||||
RunningApp.Tap(q => q.Marked(cancelButtonText));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frameShouldRegisterTap)
|
if (frameShouldRegisterTap)
|
||||||
|
|
|
@ -65,13 +65,15 @@ namespace Xamarin.Forms.Controls.Issues
|
||||||
// These controls show a pop-up which we have to cancel/done out of before we can continue
|
// These controls show a pop-up which we have to cancel/done out of before we can continue
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
var cancelButtonText = "Cancel";
|
var cancelButtonText = "Cancel";
|
||||||
|
System.Threading.Tasks.Task.Delay(1000).Wait();
|
||||||
|
RunningApp.Back();
|
||||||
#elif __IOS__
|
#elif __IOS__
|
||||||
var cancelButtonText = "Done";
|
var cancelButtonText = "Done";
|
||||||
|
RunningApp.WaitForElement(q => q.Marked(cancelButtonText));
|
||||||
|
RunningApp.Tap(q => q.Marked(cancelButtonText));
|
||||||
#else
|
#else
|
||||||
var cancelButtonText = "Cancel";
|
var cancelButtonText = "Cancel";
|
||||||
#endif
|
#endif
|
||||||
RunningApp.WaitForElement(q => q.Marked(cancelButtonText));
|
|
||||||
RunningApp.Tap(q => q.Marked(cancelButtonText));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since InputTransparent is set to false, the start label should not have changed
|
// Since InputTransparent is set to false, the start label should not have changed
|
||||||
|
|
Загрузка…
Ссылка в новой задаче