summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CarouselPageUITests.cs
blob: 14a6ed4b89f3ae2503949b9262c06b89b970f8b8 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using NUnit.Framework;

using Xamarin.Forms.CustomAttributes;
using Xamarin.UITest;

namespace Xamarin.Forms.Core.UITests
{
	[TestFixture]
	[Category ("CarouselPage")]
	internal class CarouselPageGalleryTests : BaseTestFixture
	{
		// TODO: Port to new conventions

		public CarouselPageGalleryTests ()
		{
			ShouldResetPerFixture = false;
		}

		protected override void NavigateToGallery ()
		{
			App.NavigateToGallery (GalleryQueries.CarouselPageGalleryLegacy);
		}

		[Test]
		[Description ("Swiping between screens")]
		[UiTest (typeof(CarouselPage))]
		public void CarouselPageGallerySwipeScreens ()
		{
			App.Screenshot ("At Gallery");

		//	var rootViewWidth = App.Query (q => q.Raw ("*"))[0].Rect.Width;
		//	var rootViewHeight = App.Query (q => q.Raw ("*"))[0].Rect.Height;

		//	// Verify the elements can be touched
		//	App.Tap (q => q.Button ("Click me one"));
		//	App.WaitForNoElement (q => q.Marked ("No click one"), "Timeout : No click one");
		//	App.WaitForElement (q => q.Marked ("Clicked one"), "Timeout : Clicked one");

		//	App.Pan (new Drag (ScreenBounds, rootViewWidth - 20, rootViewHeight / 2, 20, rootViewHeight / 2, Drag.Direction.RightToLeft));

		//	App.WaitForElement (q => q.Marked ("No click two"), "Timeout : No click two");
		//	App.WaitForElement (q => q.Button ("Click me two"), "Timeout : Click me two");
		//	App.Screenshot ("On page two");

		//	// Verify the elements can be touched
		//	App.Tap (q => q.Button ("Click me two"));
		//	App.WaitForNoElement (q => q.Marked ("No click two"), "Timeout : No click two");
		//	App.WaitForElement (q => q.Marked ("Clicked two"), "Timeout : Clicked two");

		//	App.Pan (new Drag (ScreenBounds, rootViewWidth - 20, rootViewHeight / 2, 20, rootViewHeight / 2, Drag.Direction.RightToLeft));

		//	App.WaitForElement (q => q.Marked ("No click three"), "Timeout : No click three");
		//	App.WaitForElement (q => q.Button ("Click me three"), "Timeout : Click me three");
		//	App.Screenshot ("On page three");

		//	// Verify the elements can be touched
		//	App.Tap (q => q.Button ("Click me three"));
		//	App.WaitForNoElement (q => q.Marked ("No click three"), "Timeout : No click three");
		//	App.WaitForElement (q => q.Marked ("Clicked three"), "Clicked three");
		//	App.Screenshot ("All screens interacted with");
		}
	}
}