forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Issue10947.cs
38 lines (29 loc) · 1.04 KB
/
Issue10947.cs
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
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
namespace Microsoft.Maui.AppiumTests.Issues;
public class Issue10947 : _IssuesUITest
{
public Issue10947(TestDevice device)
: base(device)
{ }
public override string Issue => "CollectionView Header and Footer Scrolling";
string HeaderEntry => "HeaderEntry";
string FooterEntry => "FooterEntry";
[Test]
public void CollectionViewHeaderShouldNotScroll()
{
var headerEntry = App.WaitForElement(HeaderEntry);
var headerLocation = headerEntry.GetRect();
var footerEntry = App.WaitForElement(FooterEntry);
var footerLocation = headerEntry.GetRect();
App.Click(HeaderEntry);
var newHeaderEntry = App.WaitForElement(HeaderEntry);
var newHeaderLocation = headerEntry.GetRect();
Assert.AreEqual(headerLocation, newHeaderLocation);
App.Click(FooterEntry);
var newFooterEntry = App.WaitForElement(FooterEntry);
var newFooterLocation = headerEntry.GetRect();
Assert.AreEqual(footerLocation, newFooterLocation);
}
}