blob: 3d8c6423dddadd99a065de91cc6582cabf0f23bd (
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
|
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 36559, "[WP] Navigating to a ContentPage with a Grid inside a TableView affects Entry heights")]
public class Bugzilla36559 : TestContentPage
{
protected override void Init()
{
var label = new Label { Text = "Label" };
var entry = new Entry { AutomationId = "entry" };
var grid = new Grid();
grid.Children.Add(label, 0, 0);
grid.Children.Add(entry, 1, 0);
var tableView = new TableView
{
Root = new TableRoot
{
new TableSection
{
new ViewCell
{
View = grid
}
}
}
};
Content = new StackLayout
{
Children = { tableView }
};
}
#if UITEST
[Test]
public void Bugzilla36559Test()
{
RunningApp.WaitForElement(q => q.Marked("entry"));
var results = RunningApp.Query(q => q.Marked("entry"));
Assert.AreNotEqual(results[0].Rect.Height, -1);
}
#endif
}
}
|