-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue2858.xaml.cs
83 lines (69 loc) · 1.6 KB
/
Issue2858.xaml.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
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
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
#if UITEST
using Xamarin.Forms.Core.UITests;
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[Category(UITestCategories.InputTransparent)]
[Category(UITestCategories.Gestures)]
[NUnit.Framework.Category(Core.UITests.UITestCategories.Github5000)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2858, "Transparency Cascading", PlatformAffected.Android)]
public partial class Issue2858 : TestContentPage
{
const string Success = "Success";
const string Failure = "Fail";
const string InnerGrid = "InnerGrid";
const string OuterGrid = "OuterGrid";
#pragma warning disable CS0414
int _tapCount = 0;
#pragma warning restore CS0414
public Issue2858 ()
{
#if APP
InitializeComponent ();
#endif
}
#if APP
void TapGestureRecognizer_OnTapped(object sender, EventArgs e)
{
_tapCount += 1;
if (_tapCount == 1)
{
Result.Text = Success;
}
else
{
Result.Text = Failure;
}
}
#endif
protected override void Init()
{
}
#if UITEST
[Test]
public void CascadeInputTransparentGrids()
{
RunningApp.WaitForElement(InnerGrid);
RunningApp.Tap(InnerGrid);
var green = RunningApp.WaitForElement(OuterGrid);
RunningApp.TapCoordinates(green[0].Rect.CenterX, green[0].Rect.Y + 20);
RunningApp.WaitForElement(Success);
}
#endif
}
}