Automate UI test 1219
This commit is contained in:
Родитель
e259aca3c6
Коммит
a688152ab6
|
@ -1,20 +1,36 @@
|
|||
using System;
|
||||
|
||||
using Xamarin.Forms.CustomAttributes;
|
||||
using Xamarin.Forms.CustomAttributes;
|
||||
using Xamarin.Forms.Internals;
|
||||
|
||||
#if UITEST
|
||||
using NUnit.Framework;
|
||||
using Xamarin.Forms.Core.UITests;
|
||||
#endif
|
||||
|
||||
namespace Xamarin.Forms.Controls.Issues
|
||||
{
|
||||
[Preserve (AllMembers=true)]
|
||||
[Issue (IssueTracker.Github, 1219, "Setting ToolbarItems in ContentPage constructor crashes app", PlatformAffected.iOS)]
|
||||
public class Issue1219 : ContentPage
|
||||
public class Issue1219 : TestContentPage
|
||||
{
|
||||
const string Success = "Success";
|
||||
|
||||
public Issue1219 ()
|
||||
{
|
||||
Content = new Label { Text = Success };
|
||||
|
||||
ToolbarItems.Add(new ToolbarItem ("MenuItem", "", () => {
|
||||
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Init() { }
|
||||
#if UITEST
|
||||
[Test]
|
||||
public void ViewCellInTableViewDoesNotCrash()
|
||||
{
|
||||
// If we can see this element, then we didn't crash.
|
||||
RunningApp.WaitForElement(Success);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче