summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Android.UITests/BaseTestFixture.cs
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-06-24 17:05:42 +0100
committerGitHub <noreply@github.com>2016-06-24 17:05:42 +0100
commitb15ee30765184944d2adf0917de1e6d4b5454853 (patch)
tree9321416be359b9ee668508d22105e9fc339dccfd /Xamarin.Forms.Android.UITests/BaseTestFixture.cs
parente5dd925ee5efe8d931aa8f1cbfc13d793faee567 (diff)
downloadxamarin-forms-b15ee30765184944d2adf0917de1e6d4b5454853.tar.gz
xamarin-forms-b15ee30765184944d2adf0917de1e6d4b5454853.tar.bz2
xamarin-forms-b15ee30765184944d2adf0917de1e6d4b5454853.zip
[UITest] Update to 1.3.8, remove old projects (#240)
* [UITests] Update to Xamarin UItest 1.3.8 * Remove legacy UITest projects * Remove issue that uses reference to controls * Update Xamarin.Forms.Core.iOS.UITests.csproj * Update Xamarin.Forms.Core.Android.UITests.csproj
Diffstat (limited to 'Xamarin.Forms.Android.UITests/BaseTestFixture.cs')
-rw-r--r--Xamarin.Forms.Android.UITests/BaseTestFixture.cs108
1 files changed, 0 insertions, 108 deletions
diff --git a/Xamarin.Forms.Android.UITests/BaseTestFixture.cs b/Xamarin.Forms.Android.UITests/BaseTestFixture.cs
deleted file mode 100644
index 6e38f356..00000000
--- a/Xamarin.Forms.Android.UITests/BaseTestFixture.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using System;
-using Xamarin.UITest;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.Queries;
-using NUnit.Framework;
-using System.Threading;
-
-namespace Xamarin.Forms.UITests
-{
- public class BaseTestFixture
- {
- string idiomEnvVar;
- string IPEnvVar;
-
- public AndroidApp App { get; private set; }
- public Device Device { get; set; }
-
- public BaseTestFixture ()
- {
- idiomEnvVar = Environment.GetEnvironmentVariable ("DEVICE_IDIOM");
- IPEnvVar = Environment.GetEnvironmentVariable ("DEVICE_IP");
-
- Console.WriteLine (string.Format ("****** Connecting to {0} with IP: {1} ********", idiomEnvVar, IPEnvVar));
-
- Device = SetupDevice (idiomEnvVar, IPEnvVar);
- }
-
- [SetUp]
- public void Setup ()
- {
-
- if (string.IsNullOrEmpty (idiomEnvVar) &&
- string.IsNullOrEmpty (IPEnvVar)) {
- // Use IDE Configuration
- App = ConfigureApp
- .Android
- .Debug ()
- .ApkFile ("../../../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk")
- .StartApp ();
- } else {
- // Use CI Configuration
- App = ConfigureApp
- .Android
- .DeviceIp (Device.IP)
- .ApkFile ("../../../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk")
- .StartApp ();
- }
-
- FixtureSetup ();
- }
-
- protected virtual void FixtureSetup ()
- {
- App.SetOrientationPortrait ();
- App.Screenshot ("Begin test");
- }
-
- Device SetupDevice (string idiomEnvVar, string IPEnvVar)
- {
- Device device;
-
- if (idiomEnvVar == "PHONE") {
-
- // default phone
- device = new Device (DeviceType.Phone, "10.0.1.161");
-
- if (!string.IsNullOrEmpty (IPEnvVar))
- device.IP = IPEnvVar;
-
- } else if (idiomEnvVar == "TABLET") {
-
- // default tablet
- device = new Device (DeviceType.Tablet, "10.0.1.42");
-
- if (!string.IsNullOrEmpty (IPEnvVar))
- device.IP = IPEnvVar;
-
- } else {
-
- // default phone
- device = new Device (DeviceType.Phone, "10.0.1.161");
-
- }
-
- return device;
- }
-
- }
-
- public static class PlatformStrings
- {
- public static string Button = "Button";
- public static string Cell = "xamarin.forms.platform.android.ViewCellRenderer_ViewCellContainer";
- public static string HomePageTitle = "Android Controls";
- public static string Label = "TextView";
- public static string Entry = "EditText";
- public static string Placeholder = "hint";
- public static string Text = "text";
- }
-
- public static class PlatformValues
- {
- public static int BoxViewScreenNumber = 4;
- public static int KeyboardDismissY = 500;
- public static int OffsetForScrollView = -5;
- }
-}
-