summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs
new file mode 100644
index 00000000..75c880af
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 465, "Change in Navigation.PushModal", PlatformAffected.All)]
+ public class Issue465 : TestTabbedPage
+ {
+ protected override async void Init ()
+ {
+ Children.Add (
+ new ContentPage {
+ Content = new Label {
+ Text = "I was popppppped"
+ }
+ }
+ );
+
+ await Navigation.PushModalAsync (new ModalPage ());
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ModalPage : ContentPage
+ {
+ public ModalPage ()
+ {
+ var popButton = new Button {
+ Text = "Pop this page"
+ };
+ popButton.Clicked += (s, e) => Navigation.PopModalAsync ();
+
+ Content = popButton;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue465TestsPushPopModal ()
+ {
+ RunningApp.WaitForElement (q => q.Button ("Pop this page"));
+ RunningApp.Screenshot ("All elements exist");
+
+ RunningApp.Tap (q => q.Button ("Pop this page"));
+ RunningApp.WaitForElement (q => q.Marked ("I was popppppped"));
+ RunningApp.Screenshot ("Popped modal successful");
+ }
+#endif
+ }
+}