summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs58
1 files changed, 58 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs
new file mode 100644
index 00000000..cd4721e3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs
@@ -0,0 +1,58 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35157, "CarouselPage inside NavPage inside TabbedPage gets laid out incorrectly", NavigationBehavior.PushModalAsync)]
+ public class Bugzilla35157 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var button = new Button {
+ Text = "Go",
+ AutomationId = "firstButton"
+ };
+
+
+ button.Clicked += (sender, args) => {
+ Button button2 = null;
+ button.Navigation.PushAsync (new CarouselPage {
+ Children = {
+ new ContentPage {
+ Content = button2 = new Button {
+ AutomationId = "secondButton",
+ VerticalOptions = LayoutOptions.EndAndExpand,
+ Text = "Click Me"
+ }
+ }
+ }
+ });
+
+ button2.Clicked += (s, a) => button2.Text = "Button Clicked!";
+ };
+
+ var tab = new NavigationPage(new ContentPage {Content = button});
+ tab.Title = "Tab";
+ Children.Add (tab);
+
+
+ }
+
+#if UITEST
+ [Test]
+ public void ButtonCanBeClicked ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("firstButton"));
+ RunningApp.Tap (q => q.Marked ("firstButton"));
+ RunningApp.WaitForElement (q => q.Marked ("secondButton"));
+ RunningApp.Tap (q => q.Marked ("secondButton"));
+ RunningApp.WaitForElement (q => q.Button ("Button Clicked!"));
+ }
+#endif
+ }
+} \ No newline at end of file