summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs72
1 files changed, 72 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs
new file mode 100644
index 00000000..ce6e5e12
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs
@@ -0,0 +1,72 @@
+´╗┐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, 29453, "Navigation.PopAsync(false) in Entry.Completed handler => System.ArgumentException", PlatformAffected.Android)]
+ public class Bugzilla29453 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var page1Layout = new StackLayout {
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Page 1"
+ }
+ }
+ };
+
+ var page2Layout = new StackLayout {
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Page 2"
+ }
+ }
+ };
+
+ var entry = new Entry { AutomationId = "entryText" };
+
+ entry.Completed += async (sender, args) => {
+ await Navigation.PopAsync (false);
+ };
+
+ page2Layout.Children.Add (entry);
+
+ var page2 = new ContentPage {
+ Content = page2Layout
+ };
+
+ var button = new Button {
+ Text = "Go to page 2",
+ AutomationId = "btnGotoPage2",
+ Command = new Command (async () => await Navigation.PushAsync (page2))
+ };
+
+ page1Layout.Children.Add (button);
+ Content = page1Layout;
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla29453Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue Bugzilla29453");
+ RunningApp.WaitForElement (q => q.Marked ("Page 1"));
+ RunningApp.Tap (q => q.Marked ("btnGotoPage2"));
+ RunningApp.Tap (q => q.Marked ("entryText"));
+ RunningApp.EnterText ("XF");
+ RunningApp.PressEnter ();
+ RunningApp.WaitForElement (q => q.Marked ("Page 1"));
+ }
+#endif
+ }
+}