Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Added UI test to B44338 #4307

Merged
merged 1 commit into from
Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using System.Linq;

#if UITEST
using Xamarin.UITest;
Expand All @@ -12,12 +13,25 @@ namespace Xamarin.Forms.Controls.Issues
[Issue(IssueTracker.Bugzilla, 44338, "Tapping off of a cell with an open context action causes a crash in iOS 10", PlatformAffected.iOS)]
public class Bugzilla44338 : TestContentPage
{
string[] _items;
public string[] Items
{
get
{
if (_items == null)
{
_items = new string[] { "A", "B", "C" };
}

return _items;
}
}

protected override void Init()
{
string[] items = new string[] { "A", "B", "C" };
Content = new ListView
{
ItemsSource = items,
ItemsSource = Items,
ItemTemplate = new DataTemplate(() =>
{
var label = new Label();
Expand All @@ -41,5 +55,23 @@ protected override void Init()
})
};
}

#if UITEST && __IOS__
[Test]
public void Bugzilla44338Test()
{
RunningApp.SwipeRightToLeft(Items.First());
RunningApp.Tap(Items.Last());
}
#endif

#if UITEST && __ANDROID__
[Test]
public void Bugzilla44338Test()
{
RunningApp.TouchAndHold(Items.First());
RunningApp.Tap(Items.Last());
}
#endif
}
}