diff --git a/Xamarin.Forms.Android.UITests/BaseTestFixture.cs b/Xamarin.Forms.Android.UITests/BaseTestFixture.cs deleted file mode 100644 index 6e38f356a19..00000000000 --- 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; - } -} - diff --git a/Xamarin.Forms.Android.UITests/Makefile b/Xamarin.Forms.Android.UITests/Makefile deleted file mode 100644 index 87c3be601a8..00000000000 --- a/Xamarin.Forms.Android.UITests/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -console: - calabash-android console ../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk - -testcloud: - mono xut-console.exe submit --assembly-dir ../Xamarin.Forms.Android.UITests/bin/debug ../Xamarin.Forms.ControlGallery.Android/bin/Release/AndroidControlGallery.AndroidControlGallery-Signed.apk 1a02b2e1ee5a2895e47da095cc895a49 7a47b813 - -run-phone-android: - DEVICE_IDIOM=PHONE DEVICE_ID=9adaaf78 DEVICE_IP=192.168.1.144 mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=galaxy-results.xml bin/Debug/Xamarin.Forms.Android.UITests.dll - -run-parallel-android: - DEVICE_IDIOM=TABLET mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=nexus-results.xml bin/Debug/Xamarin.Forms.Android.UITests.dll --include "CITest" & - DEVICE_IDIOM=PHONE mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=galaxy-results.xml bin/Debug/Xamarin.Forms.Android.UITests.dll --include "CITest" - -clean: - rm -rf screenshot_* test_servers/ .irb-history nexus-results.xml galaxy-results.xml diff --git a/Xamarin.Forms.Android.UITests/PlatformHelpers.cs b/Xamarin.Forms.Android.UITests/PlatformHelpers.cs deleted file mode 100644 index 6021f2a2fa0..00000000000 --- a/Xamarin.Forms.Android.UITests/PlatformHelpers.cs +++ /dev/null @@ -1,132 +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 static class PlatformHelpers - { - - public static string GetTextForQuery (this IApp app, Func query) - { - AppResult[] elements = app.Query (query); - if (elements.Length > 1) { - // Test cloud doesn't support Assert.Fail - Assert.False (true, "Query returned more than one result"); - } - return elements [0].Text; - } - - public static bool ScrollDownForElement (this IApp app, Func query, int scrollNumberLimit) - { - // Check if element exists before scrolling - if (app.Query (query).Length > 0) - return true; - - int scrollNumber = 0; - while (app.Query (query).Length == 0) { - app.ScrollDown (); - scrollNumber++; - if (scrollNumber > scrollNumberLimit) - return false; - } - - return true; - } - - public static bool ScrollUpForElement (this IApp app, Func query, int scrollNumberLimit) - { - int scrollNumber = 0; - while (app.Query (query).Length == 0) { - app.ScrollUp (); - scrollNumber++; - if (scrollNumber > scrollNumberLimit) - return false; - } - - return true; - } - - public static bool DragFromToForElement (this AndroidApp app, int scrollNumberLimit, Func query, float xStart, float yStart, float xEnd, float yEnd) - { - int numberOfScrolls = 0; - // Element exists - if (app.Query (query).Length > 0) - return true; - - while (app.Query (query).Length == 0) { - DragFromTo (app, xStart, yStart, xEnd, yEnd); - if (numberOfScrolls > scrollNumberLimit) { - return false; - } - numberOfScrolls++; - } - // Element found - return true; - } - - public static void SwipeBackNavigation (this AndroidApp app) - { - // Do nothing on Android - } - - public static void DragFromTo (this AndroidApp app, float xStart, float yStart, float xEnd, float yEnd, Speed speed = Speed.Fast) - { - // No effect on Android - app.DragCoordinates (xStart, yStart, xEnd, yEnd); - } - - public static void KeyboardIsPresent (this AndroidApp app) - { - // TODO : Add keyboard detection -// Thread.Sleep (1000); -// -// AppRect screenSize = app.MainScreenBounds (); -// AppRect contentBounds = app.Query (q => q.Raw ("*").Id ("content"))[0].Rect; -// -// bool keyboardIsShown = false; -// if ((screenSize.Height - contentBounds.Height) > (screenSize.Height / 4)) { -// // Determine if keyboard is showing by seeing if content size is shrunk by over 1/4 of screens size -// keyboardIsShown = true; -// } -// -// Assert.IsTrue (keyboardIsShown, "Keyboard should be shown"); - Assert.Inconclusive ("Keyboard should be shown"); - } - - public static void KeyboardIsDismissed (this AndroidApp app) - { - // TODO : Add keyboard detection -// AppRect screenSize = app.MainScreenBounds (); -// AppRect contentBounds = app.Query (q => q.Raw ("*").Id ("content"))[0].Rect; -// -// bool keyboardIsShown = false; -// if ((screenSize.Height - contentBounds.Height) > (screenSize.Height / 4)) { -// // Determine if keyboard is showing by seeing if content size is shrunk by over 1/4 of screens size -// keyboardIsShown = true; -// } -// -// Assert.IsFalse (keyboardIsShown, "Keyboard should be dismissed"); - Assert.Inconclusive ("Keyboard should be dismissed"); - } - - public static int IndexForElementWithText (this AndroidApp app, Func query, string text) - { - var elements = app.Query (query); - int index = 0; - for (int i = 0; i < elements.Length; i++) { - string labelText = elements[i].Text; - if (labelText == (text)) { - index = i; - break; - } - index++; - } - return index == elements.Length ? -1 : index; - } - } -} diff --git a/Xamarin.Forms.Android.UITests/PlatformQueries.cs b/Xamarin.Forms.Android.UITests/PlatformQueries.cs deleted file mode 100644 index 0b8269491ec..00000000000 --- a/Xamarin.Forms.Android.UITests/PlatformQueries.cs +++ /dev/null @@ -1,111 +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 iOSUiTestType - { - public iOSUiTestType () - { - - } - } - - public static class PlatformQueries - { - public static Func AbsoluteGalleryBackground = q => q.Raw ("xamarin.forms.platform.android.BoxRenderer parent xamarin.forms.platform.android.RendererFactory_DefaultRenderer index:0"); - public static Func ActivityIndicators = q => q.Raw ("ProgressBar"); - public static Func Back = q => q.Id ("up"); - public static Func BoxRendererQuery = q => q.Raw ("xamarin.forms.platform.android.BoxRenderer"); - public static Func Cells = q => q.Raw ("xamarin.forms.platform.android.ViewCellRenderer_ViewCellContainer"); - public static Func DismissPickerCustom = q => q.Marked ("OK"); - public static Func DismissPickerNormal = q => q.Marked ("Done"); - public static Func Entrys = q => q.Raw ("EntryEditText"); - public static Func EntryCells = q => q.Raw ("EntryCellEditText"); - public static Func Editors = q => q.Raw ("EditorEditText"); - public static Func Frames = q => q.Raw ("FrameRenderer"); - public static Func Images = q => q.Raw ("xamarin.forms.platform.android.ImageRenderer"); - public static Func ImageView = q => q.Raw("ImageView"); - public static Func LabelRenderers = q => q.Raw ("LabelRenderer"); - public static Func List = q => q.Raw ("ListView"); - public static Func Labels = q => q.Raw ("TextView"); - public static Func Map = q => q.Raw ("MapView"); - public static Func NumberPicker = q => q.Raw ("NumberPicker"); - public static Func ProgressBar = q => q.Raw ("ProgressBar"); - public static Func Tables = q => q.Raw ("ListView"); - public static Func SearchBars = q => q.Raw ("SearchView"); - public static Func Sliders = q => q.Raw ("SeekBar"); - public static Func SpanningThreeRows = q => q.Marked ("Spanning 3 rows"); - public static Func Steppers = q => q.Raw ("button marked:'+'"); - public static Func Switch = q => q.Raw("Switch"); - public static Func ThreeXThreeGridCell = q => q.Marked ("a block 3x3"); - - public static Func EntryWithPlaceholder (string text) { - return q => q.Raw (string.Format ("EntryEditText hint:'{0}'", text)); - } - public static Func EntryCellWithPlaceholder (string text) { - return q => q.Raw (string.Format ("EntryCellEditText hint:'{0}'", text)); - } - - public static Func EntryWithText (string text) { - return q => q.Raw (string.Format ("EntryEditText text:'{0}'", text)); - } - - public static Func EntryCellWithText (string text) { - return q => q.Raw (string.Format ("EntryCellEditText text:'{0}'", text)); - } - - public static Func EditorsWithText (string text) { - return q => q.Raw (string.Format ("EditorEditText text:'{0}'", text)); - } - - public static Func EntryWithIndex (int index) { - return q => q.Raw (string.Format ("EntryEditText index:{0}", index)); - } - - public static Func SearchBarWithIndex (int index) { - return q => q.Raw (string.Format ("SearchView index:{0}", index)); - } - - public static Func LabelWithIndex (int index) { - return q => q.Raw (string.Format ("TextView index:{0}", index)); - } - - public static Func LabelWithText (string text) { - return q => q.Raw (string.Format ("TextView text:'{0}'", text)); - } - - public static Func LabelWithId (string id) { - return q => q.Raw (string.Format ("TextView id:'{0}'", id)); - } - - public static Func PickerEntryWithIndex (int index) { - return q => q.Raw (string.Format ("EditText index:{0}", index)); - } - - public static Func PickerEntryWithPlaceholder (string placeholder) { - return q => q.Raw (string.Format ("EditText hint:'{0}'", placeholder)); - } - - public static Func PickerEntryWithText (string text) { - return q => q.Raw (string.Format ("EditText text:'{0}'", text)); - } - - public static Func SwitchWithIndex (int index) { - return q => q.Raw (string.Format ("Switch index:{0}", index)); - } - - public static Func StepperWithIndex (int index) { - return q => q.Raw (string.Format ("button marked:'+' index:{0}", index)); - } - - public static AppResult DetailPage (this AndroidApp app) - { - return app.Query (q => q.Raw ("*"))[0]; - } - } -} diff --git a/Xamarin.Forms.Android.UITests/Properties/AssemblyInfo.cs b/Xamarin.Forms.Android.UITests/Properties/AssemblyInfo.cs deleted file mode 100644 index 99b6aa63571..00000000000 --- a/Xamarin.Forms.Android.UITests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Xamarin.Forms.Android.UITest")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Xamarin.Forms.Android.UITest")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("fd80e73b-7225-40ce-b38d-350c5487a0df")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Xamarin.Forms.Android.UITests/Xamarin.Forms.Android.UITests.csproj b/Xamarin.Forms.Android.UITests/Xamarin.Forms.Android.UITests.csproj deleted file mode 100644 index a549f353bad..00000000000 --- a/Xamarin.Forms.Android.UITests/Xamarin.Forms.Android.UITests.csproj +++ /dev/null @@ -1,80 +0,0 @@ - - - - - Debug - AnyCPU - {D290FCBE-3196-452B-B84C-B62BF9B54F2A} - Library - Properties - Xamarin.Forms.Android.UITest - Xamarin.Forms.Android.UITests - v4.5 - 512 - ..\ - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - - - - - - - - - ..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll - True - - - - - - - TestHelpers.cs - - - - - - - - Device.cs - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/Xamarin.Forms.Android.UITests/packages.config b/Xamarin.Forms.Android.UITests/packages.config deleted file mode 100644 index 6a27733a12f..00000000000 --- a/Xamarin.Forms.Android.UITests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Xamarin.Forms.Android.UITests/testcloudupload.bat b/Xamarin.Forms.Android.UITests/testcloudupload.bat deleted file mode 100644 index 1afa4cff3a1..00000000000 --- a/Xamarin.Forms.Android.UITests/testcloudupload.bat +++ /dev/null @@ -1 +0,0 @@ -xut-console.exe submit --assembly-dir ..\Xamarin.Forms.Android.UITests\bin\debug ..\Xamarin.Forms.ControlGallery.Android\bin\Release\AndroidControlGallery.AndroidControlGallery-Signed.apk 1a02b2e1ee5a2895e47da095cc895a49 6bbba6ec diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml deleted file mode 100644 index 16f3945de2a..00000000000 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs deleted file mode 100644 index 9c9ff5d06fc..00000000000 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using Xamarin.Forms; -using System.Collections.ObjectModel; - -using Xamarin.Forms.CustomAttributes; -using Xamarin.Forms.Internals; - -namespace Xamarin.Forms.Controls -{ -#if APP - public class BaseView : ContentPage - { - public BaseView() - { - } - } - - [Preserve (AllMembers=true)] - [Issue (IssueTracker.Github, 1549, "XAML converters not invoked", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)] - public partial class Issue1549 : BaseView - { - public Issue1549 () - { - InitializeComponent (); - - Items = new ObservableCollection (); - Items.Add (new Issue1549Item () { IsLocked = true }); - Items.Add (new Issue1549Item () { IsLocked = true }); - Items.Add (new Issue1549Item () { IsLocked = true }); - Items.Add (new Issue1549Item () { IsLocked = true }); - lst.BindingContext = this; - } - - public new ObservableCollection Items { - get; - set; - } - } - - public class InvertBoolenConverter : IValueConverter - { - - #region IValueConverter implementation - - public object Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - if (value is bool) { - - return !(bool)value; - } - return value; - } - - public object ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException (); - } - - #endregion - } - - - public class Issue1549Item - { - - public bool IsLocked { - get; - set; - } - - } -#endif -} - diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index 7a1892b033f..e0cbdcd2764 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -170,9 +170,6 @@ Issue1545.xaml - - Issue1549.xaml - Issue1554.xaml @@ -409,9 +406,6 @@ MSBuild:UpdateDesignTimeXaml - - MSBuild:UpdateDesignTimeXaml - MSBuild:UpdateDesignTimeXaml diff --git a/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj b/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj index 7ae5e04c85b..04e305a2218 100644 --- a/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj +++ b/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj @@ -22,7 +22,7 @@ TRACE;DEBUG;__ANDROID__;UITEST prompt 4 - true + false 0114;0108;4014;0649;0168;0169;0219 @@ -57,8 +57,8 @@ ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - ..\packages\Xamarin.UITest.1.3.7\lib\Xamarin.UITest.dll + + ..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll True @@ -320,4 +320,4 @@ --> - \ No newline at end of file + diff --git a/Xamarin.Forms.Core.Android.UITests/packages.config b/Xamarin.Forms.Core.Android.UITests/packages.config index ab8ea99172c..bd8e626b98b 100644 --- a/Xamarin.Forms.Core.Android.UITests/packages.config +++ b/Xamarin.Forms.Core.Android.UITests/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj b/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj index b616be339b1..735bc861d97 100644 --- a/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj +++ b/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj @@ -46,8 +46,8 @@ - - ..\packages\Xamarin.UITest.1.3.7\lib\Xamarin.UITest.dll + + ..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll True diff --git a/Xamarin.Forms.Core.Windows.UITests/packages.config b/Xamarin.Forms.Core.Windows.UITests/packages.config index 814cef170a0..2a195661e61 100644 --- a/Xamarin.Forms.Core.Windows.UITests/packages.config +++ b/Xamarin.Forms.Core.Windows.UITests/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj b/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj index 47dd9454f86..ad228715ede 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj +++ b/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj @@ -22,7 +22,7 @@ TRACE;DEBUG;__IOS__;UITEST prompt 4 - true + false 0114;0108;4014;0649;0169;0168;0219 @@ -58,8 +58,8 @@ ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - ..\packages\Xamarin.UITest.1.3.7\lib\Xamarin.UITest.dll + + ..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll True @@ -179,4 +179,4 @@ --> - \ No newline at end of file + diff --git a/Xamarin.Forms.Core.iOS.UITests/packages.config b/Xamarin.Forms.Core.iOS.UITests/packages.config index ab8ea99172c..bd8e626b98b 100644 --- a/Xamarin.Forms.Core.iOS.UITests/packages.config +++ b/Xamarin.Forms.Core.iOS.UITests/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Xamarin.Forms.iOS.UITests/Device.cs b/Xamarin.Forms.iOS.UITests/Device.cs deleted file mode 100644 index 32b2cf8839e..00000000000 --- a/Xamarin.Forms.iOS.UITests/Device.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Xamarin.Forms.UITests -{ - - public enum DeviceType - { - Phone, - Tablet - } - - public class Device - { - public DeviceType Type { get; set; } - public string IP { get; set; } - - public Device (DeviceType type, string ip) - { - Type = type; - IP = ip; - } - } -} diff --git a/Xamarin.Forms.iOS.UITests/Legacy-BaseTestFixture.cs b/Xamarin.Forms.iOS.UITests/Legacy-BaseTestFixture.cs deleted file mode 100644 index 07cbe93db87..00000000000 --- a/Xamarin.Forms.iOS.UITests/Legacy-BaseTestFixture.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using Xamarin.UITest; -using Xamarin.UITest.iOS; -using Xamarin.UITest.Queries; -using NUnit.Framework; -using System.Threading; - -namespace Xamarin.Forms.UITests -{ - - public class BaseTestFixture - { - string idiomEnvVar; - string IPEnvVar; - - public static iOSApp 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)) { - // IDE Configuration - // Use your own device information - App = ConfigureApp - .iOS - .Debug () -// .DeviceIp ("10.0.1.159") // iPod iOS 7 - // .DeviceIp ("10.0.1.163") // iPhone iOS 7 - // .DeviceIp ("10.0.3.146") // iPod iOS 6 - .InstalledApp ("com.xamarin.quickui.controlgallery") - .StartApp(); - } else { - // CI Configuration - App = ConfigureApp - .iOS - .DeviceIp (Device.IP) - .InstalledApp ("com.xamarin.quickui.controlgallery") - .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.3.253"); - - if (!string.IsNullOrEmpty (IPEnvVar)) - device.IP = IPEnvVar; - - } else if (idiomEnvVar == "TABLET") { - - // default tablet - device = new Device (DeviceType.Tablet, "10.0.1.159"); - - if (!string.IsNullOrEmpty (IPEnvVar)) - device.IP = IPEnvVar; - - } else { - - // default phone - device = new Device (DeviceType.Phone, "10.0.3.253"); - - } - - return device; - } - } - - public static class PlatformStrings - { - public static string Button = "Button"; - public static string Cell = "TableViewCell"; - public static string Entry = "TextField"; - public static string HomePageTitle = "iOS Controls"; - public static string Label = "Label"; - public static string MapPin = "view:'MKPinAnnotationView'"; - public static string Placeholder = "placeholder"; - public static string Text = "text"; - } - - public static class PlatformValues - { - public static int BoxViewScreenNumber = 3; - public static int KeyboardDismissY = 200; - public static int OffsetForScrollView = 5; - } -} - diff --git a/Xamarin.Forms.iOS.UITests/Legacy-PlatformHelpers.cs b/Xamarin.Forms.iOS.UITests/Legacy-PlatformHelpers.cs deleted file mode 100644 index 014b6a50806..00000000000 --- a/Xamarin.Forms.iOS.UITests/Legacy-PlatformHelpers.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using Xamarin.UITest; -using Xamarin.UITest.iOS; -using Xamarin.UITest.Queries; -using NUnit.Framework; -using System.Threading; - -namespace Xamarin.Forms.UITests -{ - - public static class PlatformHelpers - { - - public static string GetTextForQuery (this IApp app, Func query) - { - AppResult[] elements = app.Query (query); - if (elements.Length > 1) { - // Test cloud doesn't support Assert.Fail - Assert.False (true, "Query returned more than one result"); - } - return elements [0].Label; - } - - public static bool ScrollDownForElement (this IApp app, Func query, int scrollNumberLimit) - { - var desiredElement = app.Query (query); - var tabBarElement = app.Query (q => q.Raw ("TabBar")); - // Check for elements under a TabbedBar - // If the element exists and is under the tabbed bar scroll down once - if ( - tabBarElement.Length > 0 && - desiredElement.Length > 0 && - (Math.Abs(desiredElement[0].Rect.Y - tabBarElement[0].Rect.Y) <= 75) - ) - { - app.ScrollDown (); - return true; - } - - // Check if element exists before scrolling - if (app.Query (query).Length > 0) - return true; - - int scrollNumber = 0; - while (app.Query (query).Length == 0) { - app.ScrollDown (); - scrollNumber++; - if (scrollNumber > scrollNumberLimit) - return false; - } - - // Avoid hidden elements under a tabbed controller - app.ScrollDown (); - Thread.Sleep (1000); - - return true; - } - - public static bool ScrollUpForElement (this IApp app, Func query, int scrollNumberLimit) - { - int scrollNumber = 0; - while (app.Query (query).Length == 0) { - app.ScrollUp (); - scrollNumber++; - if (scrollNumber > scrollNumberLimit) - return false; - } - - app.ScrollUp (); - - return true; - } - - public static bool DragFromToForElement (this iOSApp app, int scrollNumberLimit, Func query, float xStart, float yStart, float xEnd, float yEnd) - { - int numberOfScrolls = 0; - // Element exists - if (app.Query (query).Length > 0) - return true; - - while (app.Query (query).Length == 0) { - DragFromTo (app, xStart, yStart, xEnd, yEnd); - if (numberOfScrolls > scrollNumberLimit) { - return false; - } - numberOfScrolls++; - } - // Element found - return true; - } - - public static void SwipeBackNavigation (this iOSApp app) - { - //app.PanCoordinates (0, 125, 75, 125, TimeSpan.FromSeconds (5)); - } - - public static void DragFromTo (this iOSApp app, float xStart, float yStart, float xEnd, float yEnd, Speed speed = Speed.Fast) - { - //if (speed == Speed.Slow) - // app.PanCoordinates (xStart, yStart, xEnd, yEnd, TimeSpan.FromMilliseconds (3000)); - //else - // app.PanCoordinates (xStart, yStart, xEnd, yEnd, TimeSpan.FromMilliseconds (1000)); - - } - - public static void KeyboardIsPresent (this iOSApp app) - { - // TODO : Add keyboard detection - // app.WaitForElement (q => q.Raw ("KBKeyplaneView")); - Assert.Inconclusive ("Keyboard should be shown"); - } - - public static void KeyboardIsDismissed (this iOSApp app) - { - // TODO : Add keyboard detection - // app.WaitForNoElement (q => q.Raw ("KBKeyplaneView")); - Assert.Inconclusive ("Keyboard should be dismissed"); - } - - public static int IndexForElementWithText (this iOSApp app, Func query, string text) - { - var elements = app.Query (query); - int index = 0; - for (int i = 0; i < elements.Length; i++) { - string labelText = elements[i].Label; - if (labelText == (text)) { - index = i; - break; - } - index++; - } - return index == elements.Length ? -1 : index; - } - } -} diff --git a/Xamarin.Forms.iOS.UITests/Makefile b/Xamarin.Forms.iOS.UITests/Makefile deleted file mode 100644 index b94c6547692..00000000000 --- a/Xamarin.Forms.iOS.UITests/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -console: - DEVICE_ENDPOINT=http://10.0.3.253:37265 BUNDLE_ID=com.xamarin.quickui.controlgallery calabash-ios console - -run: - mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console.exe bin/Debug/Xamarin.Forms.iOS.UITests.dll - -run-ios-phone: - DEVICE_IDIOM=PHONE DEVICE_IP=192.168.1.145 DEVICE_ID=795a532d7fb4569fb728a79784eb73bbbca995ba mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=iphone-results.xml bin/Debug/Xamarin.Forms.iOS.UITests.dll - -run-ios: - DEVICE_IDIOM=PHONE mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=iphone-results.xml bin/Debug/Xamarin.Forms.iOS.UITests.dll --include "CITest"; - DEVICE_IDIOM=TABLET mono ../packages/NUnit.Runners.2.6.3/tools/nunit-console-x86.exe -result=ipad-results.xml bin/Debug/Xamarin.Forms.iOS.UITests.dll --include "CITest" - -clean: - rm -rf screenshot_* test_servers/ iphone-results.xml ipad-results.xml diff --git a/Xamarin.Forms.iOS.UITests/PlatformQueries.cs b/Xamarin.Forms.iOS.UITests/PlatformQueries.cs deleted file mode 100644 index 761fa004e8f..00000000000 --- a/Xamarin.Forms.iOS.UITests/PlatformQueries.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using Xamarin.UITest; -using Xamarin.UITest.iOS; -using Xamarin.UITest.Queries; -using NUnit.Framework; -using System.Threading; - -namespace Xamarin.Forms.UITests -{ - public class AndroidUiTestType - { - public AndroidUiTestType () - { - - } - } - - public static class PlatformQueries - { - public static Func AbsoluteGalleryBackground = q => q.Raw ("view:'Xamarin_Forms_Platform_iOS_BoxRenderer' parent view index:0"); - public static Func ActivityIndicators = q => q.Raw ("ActivityIndicatorView"); - public static Func Back = q => q.Raw ("view:'UINavigationItemButtonView'"); - public static Func BoxRendererQuery = q => q.Raw ("view:'Xamarin_Forms_Platform_iOS_BoxRenderer'"); - public static Func Cells = q => q.Raw ("TableViewCell"); - public static Func DismissPickerCustom = q => q.Marked ("Done"); - public static Func DismissPickerNormal = q => q.Marked ("Done"); - public static Func Entrys = q => q.Raw ("TextField"); - public static Func Editors = q => q.Raw ("TextView"); - public static Func Frames = q => q.Raw ("view:'Xamarin_Forms_Platform_iOS_FrameRenderer'"); - public static Func Images = q => q.Raw ("view:'Xamarin_Forms_Platform_iOS_ImageRenderer'"); - public static Func ImageView = q => q.Raw ("ImageView"); - public static Func Labels = q => q.Raw ("Label"); - public static Func LabelRenderers = q => q.Raw ("view:'Xamarin_Forms_Platform_iOS_LabelRenderer'"); - public static Func List = q => q.Raw ("TableView"); - public static Func Map = q => q.Raw ("view:'MKMapView'"); - public static Func MapPins = q => q.Raw ("all view:'MKPinAnnotationView'"); - public static Func NavigationBar = q => q.Raw ("NavigationBar"); - public static Func NumberPicker = q => q.Raw ("PickerTableView"); - public static Func ProgressBar = q => q.Raw ("ProgressView"); - public static Func SearchBars = q => q.Raw ("SearchBar"); - public static Func Sliders = q => q.Raw ("Slider"); - public static Func Steppers = q => q.Raw ("Stepper"); - public static Func Switch = q => q.Raw ("Switch"); - public static Func Tables = q => q.Raw ("TableView"); - public static Func ThreeXThreeGridCell = q => q.Raw ("view marked:'a block 3x3' parent view:'Xamarin_Forms_Platform_iOS_LabelRenderer'"); - public static Func SpanningThreeRows = q => q.Raw ("view marked:'Spanning 3 rows' parent view:'Xamarin_Forms_Platform_iOS_LabelRenderer'"); - - public static Func EntryWithPlaceholder (string text) { - return q => q.Raw (string.Format ("TextField placeholder:'{0}'", text)); - } - - public static Func EntryWithText (string text) { - return q => q.Raw (string.Format ("TextField text:'{0}'", text)); - } - - public static Func EntryCellWithPlaceholder (string text) { - return q => q.Raw (string.Format ("TextField placeholder:'{0}'", text)); - } - - public static Func EntryCellWithText (string text) { - return q => q.Raw (string.Format ("TextField text:'{0}'", text)); - } - - public static Func EditorsWithText (string text) { - return q => q.Raw (string.Format ("TextView text:'{0}'", text)); - } - - public static Func EntryWithIndex (int index) { - return q => q.Raw (string.Format ("TextField index:{0}", index)); - } - - public static Func SearchBarWithIndex (int index) { - return q => q.Raw (string.Format ("SearchBar index:{0}", index)); - } - - public static Func LabelWithIndex (int index) { - return q => q.Raw (string.Format ("Label index:{0}", index)); - } - - public static Func LabelWithText (string text) { - return q => q.Raw (string.Format ("Label text:'{0}'", text)); - } - - public static Func LabelWithId (string id) { - return q => q.Raw (string.Format ("Label id:'{0}'", id)); - } - - public static Func PickerEntryWithIndex (int index) { - return q => q.Raw (string.Format ("TextField index:{0}", index)); - } - - public static Func PickerEntryWithPlaceholder (string placeholder) { - return q => q.Raw (string.Format ("TextField placeholder:'{0}'", placeholder)); - } - - public static Func PickerEntryWithText (string text) { - return q => q.Raw (string.Format ("TextField text:'{0}'", text)); - } - - public static Func SwitchWithIndex (int index) { - return q => q.Raw (string.Format ("Switch index:{0}", index)); - } - - public static Func StepperWithIndex (int index) { - return q => q.Raw (string.Format ("Stepper index:{0}", index)); - } - - public static AppResult DetailPage (this iOSApp app) - { - if (app.Query (q => q.Raw ("view:'UILayoutContainerView'")).Length == 3) { - // iPad SplitView Landscape - return app.Query (q => q.Raw ("view:'UILayoutContainerView'"))[2]; - } - return app.Query (q => q.Raw ("*"))[0]; - } - - } -} diff --git a/Xamarin.Forms.iOS.UITests/Properties/AssemblyInfo.cs b/Xamarin.Forms.iOS.UITests/Properties/AssemblyInfo.cs deleted file mode 100644 index 7ff77aacbcd..00000000000 --- a/Xamarin.Forms.iOS.UITests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Xamarin.Forms.iOS.UITests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Xamarin.Forms.iOS.UITests")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6269ddd8-ec05-4638-97ec-939651fec5a8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Xamarin.Forms.iOS.UITests/TestHelpers.cs b/Xamarin.Forms.iOS.UITests/TestHelpers.cs deleted file mode 100644 index 981122cbd76..00000000000 --- a/Xamarin.Forms.iOS.UITests/TestHelpers.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Xamarin.UITest; -using Xamarin.UITest.Queries; - -namespace Xamarin.Forms.UITests -{ - public enum Speed - { - Slow, - Fast - } - - public static class TestHelpers - { - public static int ControlGalleryMaxScrolls = 30; - - public static void NavigateBack (this IApp app) - { - app.Tap (PlatformQueries.Back); - } - - public static void NavigateToTestCases (this IApp app) - { - app.Tap (q => q.Marked ("Test Cases")); - app.WaitForElement (q => q.Marked ("Carousel Async Add Page Issue")); - } - - public static AppRect MainScreenBounds (this IApp app) - { - return app.Query (q => q.Raw ("*"))[0].Rect; - } - - } -} - diff --git a/Xamarin.Forms.iOS.UITests/Xamarin.Forms.iOS.UITests.csproj b/Xamarin.Forms.iOS.UITests/Xamarin.Forms.iOS.UITests.csproj deleted file mode 100644 index 930b63c2b67..00000000000 --- a/Xamarin.Forms.iOS.UITests/Xamarin.Forms.iOS.UITests.csproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Debug - AnyCPU - {6108FD24-F3B1-463D-83E2-35B981A1CB81} - Library - Properties - Xamarin.Forms.iOS.UITests - Xamarin.Forms.iOS.UITests - v4.5 - 512 - ..\ - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - - ..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll - True - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/Xamarin.Forms.iOS.UITests/packages.config b/Xamarin.Forms.iOS.UITests/packages.config deleted file mode 100644 index 6a27733a12f..00000000000 --- a/Xamarin.Forms.iOS.UITests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file