blob: e57ed902636c2f29eb9bd42ebdae4ece61f1c2b1 (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
using NUnit.Framework;
using Xamarin.UITest;
namespace Xamarin.Forms.Core.UITests
{
[TestFixture]
[Category ("ListView")]
internal class ListGalleryTests : BaseTestFixture
{
// TODO
// TODO: Port to new conventions
public ListGalleryTests ()
{
ShouldResetPerFixture = false;
}
protected override void NavigateToGallery ()
{
App.NavigateToGallery (GalleryQueries.ListViewGalleryLegacy);
}
// void AllElementsExist ()
// {
// for (int i = 0; i < 5; i++)
// App.WaitForElement (q => q.Marked (i.ToString ()));
// App.Screenshot ("List elements exist");
// }
[Test]
[Description ("Click 0 - 5 and reset")]
public void ListGalleryClickElementsAndReset ()
{
// AllElementsExist ();
// for (int i = 0; i < 5; i++) {
// App.Tap (q => q.Raw (string.Format ("{0} index:{1}", PlatformStrings.Cell, i)));
// }
// App.WaitForNoElement (q => q.Marked ("0"), "Timeout : 0");
// Assert.AreEqual (2, App.Query (q => q.Marked ("5")).Length);
// App.Screenshot ("Clicked 0 - 5");
// App.Tap (q => q.Raw (PlatformStrings.Cell + " index:5"));
// App.WaitForElement (q => q.Marked ("0"), "Timeout : 0");
// Assert.AreEqual (1, App.Query (q => q.Marked ("5")).Length);
// App.Screenshot ("Reset elements");
}
// [Test]
// [Description ("Scroll to the end of the list")]
// public void ListGalleryScrollToEndOfList ()
// {
// AllElementsExist ();
// for (int i = 0; i < 50; i++)
// App.ScrollDownForElement (q => q.Marked (i.ToString ()), 2);
// App.Screenshot ("At the bottom of the list");
// }
///*******************************************************/
///**************** Landscape tests **********************/
///*******************************************************/
// [Test]
// [Description ("Click 0 - 5 and reset - Landscape")]
// public void ListGalleryClickElementsAndResetLandscape ()
// {
// App.SetOrientationLandscape ();
// App.Screenshot ("Rotated to Landscape");
// ListGalleryClickElementsAndReset ();
// App.SetOrientationPortrait ();
// App.Screenshot ("Rotated to Portrait");
// }
// [Test]
// [Description ("Scroll to the end of the list - Landscape")]
// public void ListGalleryScrollToEndOfListLandscape ()
// {
// App.SetOrientationLandscape ();
// App.Screenshot ("Rotated to Landscape");
// ListGalleryScrollToEndOfList ();
// App.SetOrientationPortrait ();
// App.Screenshot ("Rotated to Portrait");
// }
}
}
|