summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs78
1 files changed, 78 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs
new file mode 100644
index 00000000..3f5f5abc
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs
@@ -0,0 +1,78 @@
+´╗┐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, 28498, "App crashes when switching between NavigationPages on a MasterDetailPage when In-Call Status Bar is visible")]
+ public class Bugzilla28498 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+
+
+ var carrouselChildPage = new ContentPage { Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Label { Text = "Carousel Page" },
+ new Button { Text = "Open", AutomationId="btnOpen", Command = new Command (() => IsPresented = true) },
+ },
+ Padding = 10
+ }
+ };
+
+ var otherPage = new ContentPage { Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Label { Text = "Other" },
+ new Button { Text = "Open", AutomationId="btnOpen", Command = new Command (() => IsPresented = true) },
+ },
+ Padding = 10
+ }
+ };
+
+ var carousel = new NavigationPage(new CarouselPage { Children = { carrouselChildPage } });
+ var other = new NavigationPage(otherPage);
+ Detail = carousel;
+
+ Master = new ContentPage
+ {
+ Title = "Menu",
+ Content = new StackLayout
+ {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Button { Text = "Page 1 (Carousel)", AutomationId="btnCarousel", Command = new Command(() => Detail = carousel) },
+ new Button { Text = "Page 2 (Other)", AutomationId="btnOther", Command = new Command(() => Detail = other) },
+ },
+ Padding = 10
+ }
+ };
+
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla28498Test ()
+ {
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ RunningApp.Tap (q => q.Marked ("btnOther"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ RunningApp.Screenshot ("Detail open");
+
+ if (RunningApp.Query (c => c.Marked ("btnCarousel")).Length > 0)
+ Assert.DoesNotThrow (() => RunningApp.Tap (q => q.Marked ("btnCarousel")));
+ else
+ Assert.Inconclusive ("Should be button here, but rotation could take some time on XTC");
+ }
+#endif
+ }
+}