summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs
blob: 448a06a25814a965c3f856eb062aea289719eea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Linq;

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

#if UITEST
using NUnit.Framework;
using Xamarin.UITest;
#endif

namespace Xamarin.Forms.Controls.Issues
{
	[Preserve (AllMembers = true)]
	[Issue (IssueTracker.Github, 416, "NavigationPage in PushModal does not show NavigationBar", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
	public class Issue416 : TestNavigationPage
	{
		protected override void Init ()
		{
			Navigation.PushAsync (new ContentPage {
				Title = "Test Page",
				Content = new Label {
					Text = "I should have a nav bar"
				}
			});
		}

		// Issue 416
		// NavigationBar should be visible in modal

#if UITEST
		[Test]
		[UiTest (typeof(NavigationPage))]
		public void Issue416TestsNavBarPresent ()
		{
			RunningApp.WaitForElement (q => q.Marked ("Test Page"));
			RunningApp.WaitForElement (q => q.Marked ("I should have a nav bar"));
			RunningApp.Screenshot ("All element present");
		}
#endif
    }
}