summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.iOS.UITests/TestHelpers.cs
blob: 981122cbd76e77d38286b3a9a2411dffd45f19fd (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
using Xamarin.UITest;
using Xamarin.UITest.Queries;

namespace Xamarin.Forms.UITests
{
	public enum Speed
	{
		Slow,
		Fast
	}

	public static class TestHelpers
	{
		public static int ControlGalleryMaxScrolls = 30;

		public static void NavigateBack (this IApp app) 
		{
			app.Tap (PlatformQueries.Back);
		}

		public static void NavigateToTestCases (this IApp app)
		{
			app.Tap (q => q.Marked ("Test Cases"));
			app.WaitForElement (q => q.Marked ("Carousel Async Add Page Issue"));
		}

		public static AppRect MainScreenBounds (this IApp app)
		{
			return app.Query (q => q.Raw ("*"))[0].Rect;
		}

	}
}