From 17fdde66d94155fc62a034fa6658995bef6fd6e5 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 22 Mar 2016 13:02:25 -0700 Subject: Initial import --- .../Bugzilla32040.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs') diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs new file mode 100644 index 00000000..a6d9c830 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs @@ -0,0 +1,59 @@ +using System; + +using Xamarin.Forms.CustomAttributes; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls +{ + [Preserve (AllMembers = true)] + [Issue (IssueTracker.Bugzilla, 32040, "EntryCell.Tapped or SwitchCell.Tapped does not fire when within a TableView ")] + public class Bugzilla32040 : TestContentPage // or TestMasterDetailPage, etc ... + { + protected override void Init () + { + var switchCell = new SwitchCell { Text = "blahblah" }; + switchCell.Tapped += (s, e) => + { + switchCell.Text = "Tapped"; + }; + switchCell.OnChanged += (sender, e) => { + switchCell.Text = "Switched"; + }; + + var entryCell = new EntryCell { Text = "yaddayadda" }; + entryCell.XAlign = TextAlignment.End; + entryCell.Label = "Click Here"; + entryCell.Tapped += (s, e) => + { + entryCell.Text = "Tapped"; + }; + entryCell.Completed += (sender, e) => { + entryCell.Text = "Completed"; + }; + + // The root page of your application + Content = new TableView { + Intent = TableIntent.Form, + Root = new TableRoot ("Table Title") { + new TableSection ("Section 1 Title") { + switchCell, + entryCell + } + } + }; + } +#if UITEST + [Test] + public void TappedWorksForEntryAndSwithCellTest () + { + RunningApp.Tap (q => q.Marked ("blahblah")); + RunningApp.Tap (q => q.Marked ("Click Here")); + Assert.GreaterOrEqual (RunningApp.Query (q => q.Marked ("Tapped")).Length, 2); + } +#endif + } +} -- cgit v1.2.3