summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StackLayoutUITest.cs
blob: b17c7ec8a8800751bb9515dc4cf471990b316fba (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
64
65
66
67
68
69
70
71
72
73
74
75
76
using NUnit.Framework;
using Xamarin.UITest;
using System.Collections.Generic;

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

		public StackLayoutGalleryTests ()
		{
			ShouldResetPerFixture = false;
		}

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

//		void AllElementsPresent ()
//		{
//			var buttons = new [] {
//				"Boring",
//				"Exciting!",
//				"Amazing!",
//				"Meh"
//			};

//			foreach (var button in buttons) {
//				App.WaitForElement (q => q.Button (button));
//			}

//			App.Screenshot ("All elements exist");
//		}

		[Test]
		[Description ("Check that each button is there and click them")]
		public void StackLayoutGalleryClickEachButton ()
		{
//			AllElementsPresent ();

//			App.Tap (q => q.Button ("Boring"));
//			App.WaitForElement (q => q.Button ("clicked1"), "Timeout : clicked1");

//			App.Tap (q => q.Button ("Exciting!"));
//			App.WaitForElement (q => q.Button ("clicked2"), "Timeout : clicked2");

//			App.Tap (q => q.Button ("Amazing!"));
//			App.WaitForElement (q => q.Button ("clicked3"), "Timeout : clicked3");

//			App.Tap (q => q.Button ("Meh"));
//			App.WaitForElement (q => q.Button ("clicked4"), "Timeout : clicked4");

//			App.Screenshot ("All buttons clicked");
		}

///*******************************************************/
///**************** Landscape tests **********************/
///*******************************************************/
//		[Test]
//		[Description ("Check that each button is there and click them - Landscape")]
//		public void StackLayoutGalleryClickEachButtonLandscape ()
//		{
//			App.SetOrientationLandscape ();
//			App.Screenshot ("Rotated to Landscape");
//			StackLayoutGalleryClickEachButton ();
//			App.SetOrientationPortrait ();
//			App.Screenshot ("Rotated to Portrait");
//		}

	}
}