summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to 'Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs')
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs73
1 files changed, 73 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
new file mode 100644
index 00000000..45b73374
--- /dev/null
+++ b/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
@@ -0,0 +1,73 @@
+using System;
+using System.CodeDom;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Threading;
+using System.Reflection;
+
+using NUnit.Framework;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.UITest.Android;
+using Xamarin.UITest.Queries;
+using Xamarin.UITest.iOS;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category ("Entry")]
+ internal class EntryUITests : _ViewUITests
+ {
+ public EntryUITests ()
+ {
+ PlatformViewType = Views.Entry;
+ }
+
+ protected override void NavigateToGallery ()
+ {
+ App.NavigateToGallery (GalleryQueries.EntryGallery);
+ }
+
+ // TODO
+ public override void _Focus () {}
+
+ [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _GestureRecognizers () {}
+
+ // TODO
+ public override void _IsFocused () {}
+
+ // TODO
+ public override void _UnFocus () {}
+
+ // TODO
+ // Implement control specific ui tests
+ [Test]
+ [UiTest (typeof(Entry), "Completed")]
+ public void Completed ()
+ {
+ var remote = new EventViewContainerRemote (App, Test.Entry.Completed, PlatformViewType);
+ remote.GoTo ();
+
+ App.EnterText (q=> q.Raw (remote.ViewQuery), "Test");
+
+ if (App is AndroidApp) {
+ ((AndroidApp)App).PressUserAction (UserAction.Done);
+ } else {
+ App.PressEnter ();
+ }
+
+ var eventLabelText = remote.GetEventLabel ().Text;
+ Assert.AreEqual (eventLabelText, "Event: Completed (fired 1)");
+ }
+
+ protected override void FixtureTeardown ()
+ {
+ App.NavigateBack ();
+ base.FixtureTeardown ();
+ }
+
+ }
+} \ No newline at end of file