-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Bugzilla33578.cs
103 lines (99 loc) · 2.77 KB
/
Bugzilla33578.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
#if UITEST
using Xamarin.UITest;
using Xamarin.UITest.iOS;
using NUnit.Framework;
#endif
namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
#if UITEST
[Category(Compatibility.UITests.UITestCategories.Bugzilla)]
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 33578, "TableView EntryCell shows DefaultKeyboard, but after scrolling down and back a NumericKeyboard (")]
public class Bugzilla33578 : TestContentPage // or TestFlyoutPage, etc ...
{
protected override void Init()
{
Content = new TableView
{
Root = new TableRoot {
new TableSection {
new EntryCell {
Placeholder = "Enter text here 1",
AutomationId = "entryNormal"
},
new EntryCell {
Placeholder = "Enter text here 2"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here"
},
new EntryCell {
Placeholder = "Enter text here",
AutomationId = "entryPreviousNumeric"
},
new EntryCell {
Keyboard = Keyboard.Numeric,
Placeholder = "0",
AutomationId = "entryNumeric"
}
}
}
};
}
#if UITEST && __IOS__
[Test]
[Compatibility.UITests.FailsOnMauiIOS]
public void TableViewEntryCellShowsDefaultKeyboardThenNumericKeyboardAfterScrolling()
{
RunningApp.ScrollDown();
RunningApp.ScrollDown();
RunningApp.Tap(x => x.Marked("0"));
var e = RunningApp.Query(c => c.Marked("0").Parent("UITextField").Index(0).Invoke("keyboardType"))[0];
//8 DecimalPad
Assert.AreEqual(8, e);
RunningApp.DismissKeyboard();
RunningApp.Tap(x => x.Marked("Enter text here").Index(0).Parent());
RunningApp.ScrollUp();
RunningApp.Tap(x => x.Marked("Enter text here 1"));
RunningApp.Tap(x => x.Marked("Enter text here 2").Index(0).Parent());
var e1 = RunningApp.Query(c => c.Marked("Enter text here 2").Parent("UITextField").Index(0).Invoke("keyboardType"))[0];
Assert.AreEqual(0, e1);
}
#endif
}
}