summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs99
1 files changed, 99 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs
new file mode 100644
index 00000000..0df73ddb
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs
@@ -0,0 +1,99 @@
+´╗┐using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33578, "TableView EntryCell shows DefaultKeyboard, but after scrolling down and back a NumericKeyboard (")]
+ public class Bugzilla33578 : TestContentPage // or TestMasterDetailPage, 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
+ [Test]
+ [Ignore("Needs Xamarin.UITest 0.18")]
+ public void Bugzilla33578Test ()
+ {
+ if (RunningApp is iOSApp) {
+ 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
+ }
+}