summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/UnevenListGallery.cs10
-rw-r--r--Xamarin.Forms.Core.Android.UITests/PlatformQueries.cs133
-rw-r--r--Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj134
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/BaseTestFixture.cs (renamed from Xamarin.Forms.Core.iOS.UITests/BaseTestFixture.cs)11
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/PlatformQueries.cs278
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Queries.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Queries.cs)31
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs)213
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Remotes/EventViewContainerRemote.cs21
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Remotes/LayeredViewContainerRemote.cs25
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Remotes/StateViewContainerRemote.cs27
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Remotes/ViewContainerRemote.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Remotes/ViewContainerRemote.cs)2
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ActionSheetUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/ActionSheetUITests.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ActivityIndicatorUITests.cs69
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/AppearingUITests.cs66
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/AutomationIDUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/AutomationIDUITests.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/BoxViewUITests.cs57
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ButtonUITests.cs172
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ContextActionsUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/ContextActionsUITests.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/DatePickerUITests.cs50
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/DisplayAlertUITests.cs58
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/EditorUITests.cs50
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/EntryUITests.cs63
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/FrameUITests.cs57
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ImageUITests.cs61
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/LabelUITests.cs54
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-CellsUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs)66
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-UnevenListTests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-UnevenListTests.cs)15
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/PickerUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/PickerUITests.cs)12
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ProgressBarUITests.cs54
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/RootGalleryUITests.cs93
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ScrollViewUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs)1
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/SearchBarUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/SearchBarUITests.cs)14
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/SliderUITests.cs48
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/StepperUITests.cs48
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/SwitchUITests.cs48
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/TimePickerUITests.cs51
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ToolbarItemTests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/ViewUITests.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Tests/WebViewUITests.cs111
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/UITestCategories.cs (renamed from Xamarin.Forms.Core.iOS.UITests/UITestCategories.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/AppExtensions.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/AppExtensions.cs)0
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/Drag.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/Drag.cs)2
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/Gestures.cs)5
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/Logger.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/Logger.cs)2
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/NumericExtensions.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/NumericExtensions.cs)12
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/ParsingUtils.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/ParsingUtils.cs)14
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/UITestCustomExceptions.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/UITestCustomExceptions.cs)6
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Utilities/ViewInspector.cs (renamed from Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs)7
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.Shared.shproj13
-rw-r--r--Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.projitems58
-rw-r--r--Xamarin.Forms.Core.Windows.UITests/App.cs19
-rw-r--r--Xamarin.Forms.Core.Windows.UITests/PlatformQueries.cs129
-rw-r--r--Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj135
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/PlatformQueries.cs136
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Remotes/EventViewContainerRemote.cs20
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Remotes/LayeredViewContainerRemote.cs25
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Remotes/RemoteFactory.cs56
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Remotes/StateViewContainerRemote.cs35
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/ActivityIndicatorUITests.cs67
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/AppearingUITests.cs72
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/BoxViewUITests.cs60
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs180
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/DatePickerUITests.cs55
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/DisplayAlertUITests.cs63
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/EditorUITests.cs55
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs69
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/FrameUITests.cs60
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/ImageUITests.cs63
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/LabelUITests.cs57
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/ProgressBarUITests.cs56
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/RootGalleryUITests.cs95
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/SliderUITests.cs54
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/StepperUITests.cs55
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/SwitchUITests.cs54
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/TimePickerUITests.cs56
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/WebViewUITests.cs101
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj47
-rw-r--r--Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj136
-rw-r--r--Xamarin.Forms.sln8
79 files changed, 1814 insertions, 2526 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/UnevenListGallery.cs b/Xamarin.Forms.Controls/GalleryPages/UnevenListGallery.cs
index 1c8b16c4..3a3b150f 100644
--- a/Xamarin.Forms.Controls/GalleryPages/UnevenListGallery.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/UnevenListGallery.cs
@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls
{
- public class UnevenListGallery : ContentPage
+ [Preserve(AllMembers = true)]
+ public class UnevenListGallery : ContentPage
{
- public UnevenListGallery ()
+ public UnevenListGallery ()
{
Padding = new Thickness (0, 20, 0, 0);
@@ -67,7 +69,9 @@ For in that sleep of death, what dreams may come",
Content = grd;
}
- public class UnevenRowsCell : ViewCell
+
+ [Preserve(AllMembers = true)]
+ public class UnevenRowsCell : ViewCell
{
public UnevenRowsCell ()
{
diff --git a/Xamarin.Forms.Core.Android.UITests/PlatformQueries.cs b/Xamarin.Forms.Core.Android.UITests/PlatformQueries.cs
deleted file mode 100644
index 01a27aac..00000000
--- a/Xamarin.Forms.Core.Android.UITests/PlatformQueries.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using Xamarin.UITest.Android;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal static class AndroidLoaderIdentifier {}
-
- internal static class PlatformMethodQueries
- {
- public static readonly Dictionary<BindableProperty, Tuple<string[], bool>> PropertyPlatformMethodDictionary = new Dictionary<BindableProperty, Tuple<string[], bool>> {
- { ActivityIndicator.ColorProperty, Tuple.Create (new[] { "getProgressDrawable", "getColor" }, false) },
- { ActivityIndicator.IsRunningProperty, Tuple.Create (new[] { "isIndeterminate" }, false) },
- { Button.BorderColorProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.BorderRadiusProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.BorderWidthProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.ImageProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.FontProperty, Tuple.Create (new[] { "getTypeface", "isBold" }, false) },
- { Button.TextProperty, Tuple.Create (new[] { "getText" }, false) },
- { Button.TextColorProperty, Tuple.Create (new[] { "getCurrentTextColor" }, false) },
- { View.AnchorXProperty, Tuple.Create (new[] { "getPivotX" }, true) },
- { View.AnchorYProperty, Tuple.Create (new[] { "getPivotY" }, true) },
- { View.BackgroundColorProperty, Tuple.Create (new[] { "getBackground", "getColor" }, true) },
- { View.IsEnabledProperty, Tuple.Create (new[] { "isEnabled" }, false) },
- { View.OpacityProperty, Tuple.Create (new[] { "getAlpha" }, true) },
- { View.RotationProperty, Tuple.Create (new[] { "getRotation" }, true) },
- { View.RotationXProperty, Tuple.Create (new[] { "getRotationX" }, true) },
- { View.RotationYProperty, Tuple.Create (new[] { "getRotationY" }, true) },
- { View.ScaleProperty, Tuple.Create (new[] { "getScaleX", "getScaleY" }, true) },
- };
- }
-
- internal static class PlatformViews
- {
- public static readonly string ActivityIndicator = "android.widget.ProgressBar";
- public static readonly string BoxView = "xamarin.forms.platform.android.BoxRenderer";
- public static readonly string Button = "android.widget.Button";
- public static readonly string DatePicker = "android.widget.EditText";
- public static readonly string Editor = "xamarin.forms.platform.android.EditorEditText";
- public static readonly string Entry = "xamarin.forms.platform.android.EntryEditText";
- public static readonly string Frame = "xamarin.forms.platform.android.appcompat.FrameRenderer";
- public static readonly string Image = "android.widget.ImageView";
- public static readonly string Label = "android.widget.TextView";
- public static readonly string ListView = "android.widget.ListView";
- public static readonly string OpenGLView = "android.widget.GLSurfaceView";
- public static readonly string Picker = "android.widget.EditText";
- public static readonly string ProgressBar = "android.widget.ProgressBar";
- public static readonly string SearchBar = "android.widget.SearchView";
- public static readonly string Slider = "android.widget.SeekBar";
- public static readonly string Stepper = "button marked:'+'";
- public static readonly string Switch = "android.widget.Switch";
- public static readonly string TableView = "android.widget.ListView";
- public static readonly string TimePicker = "android.widget.EditText";
- public static readonly string WebView = "android.widget.WebView";
- }
-
- internal static class PlatformQueries
- {
- public static readonly Func<AppQuery, AppQuery> Root = q => q.Id ("content");
- public static readonly Func<AppQuery, AppQuery> RootPageListView = q => q.Raw ("ListViewRenderer index:0");
- public static readonly Func<AppQuery, AppQuery> GalleryListView = q => q.Raw ("ListViewRenderer index:1");
- public static readonly Func<AppQuery, AppQuery> PageWithoutNavigationBar = q => q.Raw ("* id:'content' index:0");
- public static readonly Func<AppQuery, AppQuery> NavigationBarBackButton = q => q.Class ("android.support.v7.widget.Toolbar").Child ("android.widget.ImageButton");
-
- // Views
- public static readonly Func<AppQuery, AppQuery> ActivityIndicator = q => q.ClassFull (PlatformViews.ActivityIndicator);
- public static readonly Func<AppQuery, AppQuery> Button = q => q.ClassFull (PlatformViews.Button);
-
- public static Func<AppQuery, AppQuery> EntryWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("EntryEditText hint:'{0}'", text));
- }
- public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("EntryCellEditText hint:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithText (string text) {
- return q => q.Raw (string.Format ("EntryEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryCellWithText (string text) {
- return q => q.Raw (string.Format ("EntryCellEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EditorsWithText (string text) {
- return q => q.Raw (string.Format ("EditorEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithIndex (int index) {
- return q => q.Raw (string.Format ("EntryEditText index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> SearchBarWithIndex (int index) {
- return q => q.Raw (string.Format ("SearchView index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithIndex (int index) {
- return q => q.Raw (string.Format ("TextView index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithText (string text) {
- return q => q.Raw (string.Format ("TextView text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithId (string id) {
- return q => q.Raw (string.Format ("TextView id:'{0}'", id));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithIndex (int index) {
- return q => q.Raw (string.Format ("EditText index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithPlaceholder (string placeholder) {
- return q => q.Raw (string.Format ("EditText hint:'{0}'", placeholder));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithText (string text) {
- return q => q.Raw (string.Format ("EditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> SwitchWithIndex (int index) {
- return q => q.Raw (string.Format ("Switch index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> StepperWithIndex (int index) {
- return q => q.Raw (string.Format ("button marked:'+' index:{0}", index));
- }
- }
-} \ No newline at end of file
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 983add24..0f25f8ae 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
@@ -63,141 +63,8 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\BaseTestFixture.cs">
- <Link>BaseTestFixture.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Queries.cs">
- <Link>Queries.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\BaseViewContainerRemote.cs">
- <Link>Remotes\BaseViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\EventViewContainerRemote.cs">
- <Link>Remotes\EventViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\LayeredViewContainerRemote.cs">
- <Link>Remotes\LayeredViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\StateViewContainerRemote.cs">
- <Link>Remotes\StateViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\ViewContainerRemote.cs">
- <Link>Remotes\ViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActivityIndicatorUITests.cs">
- <Link>Tests\ActivityIndicatorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\BoxViewUITests.cs">
- <Link>Tests\BoxViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ButtonUITests.cs">
- <Link>Tests\ButtonUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ContextActionsUITests.cs">
- <Link>Tests\ContextActionsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DatePickerUITests.cs">
- <Link>Tests\DatePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EditorUITests.cs">
- <Link>Tests\EditorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EntryUITests.cs">
- <Link>Tests\EntryUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\FrameUITests.cs">
- <Link>Tests\FrameUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ImageUITests.cs">
- <Link>Tests\ImageUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\LabelUITests.cs">
- <Link>Tests\LabelUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-CellsUITests.cs">
- <Link>Tests\Legacy-CellsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\PickerUITests.cs">
- <Link>Tests\PickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ProgressBarUITests.cs">
- <Link>Tests\ProgressBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SearchBarUITests.cs">
- <Link>Tests\SearchBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SliderUITests.cs">
- <Link>Tests\SliderUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\StepperUITests.cs">
- <Link>Tests\StepperUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SwitchUITests.cs">
- <Link>Tests\SwitchUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\TimePickerUITests.cs">
- <Link>Tests\TimePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ViewUITests.cs">
- <Link>Tests\ViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\WebViewUITests.cs">
- <Link>Tests\WebViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\UITestCategories.cs">
- <Link>UITestCategories.cs</Link>
- </Compile>
- <Compile Include="PlatformQueries.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\RemoteFactory.cs">
- <Link>Remotes\RemoteFactory.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\AppExtensions.cs">
- <Link>Utilities\AppExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Drag.cs">
- <Link>Utilities\Drag.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Gestures.cs">
- <Link>Utilities\Gestures.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Logger.cs">
- <Link>Utilities\Logger.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\NumericExtensions.cs">
- <Link>Utilities\NumericExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ParsingUtils.cs">
- <Link>Utilities\ParsingUtils.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\UITestCustomExceptions.cs">
- <Link>Utilities\UITestCustomExceptions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ViewInspector.cs">
- <Link>Utilities\ViewInspector.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DisplayAlertUITests.cs">
- <Link>Tests\DisplayAlertUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActionSheetUITests.cs">
- <Link>Tests\ActionSheetUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ToolbarItemTests.cs">
- <Link>Tests\ToolbarItemTests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ScrollViewUITests.cs">
- <Link>Tests\ScrollViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\RootGalleryUITests.cs">
- <Link>Tests\RootGalleryUITests.cs</Link>
- </Compile>
<Compile Include="PlatformTests\DisplayAlertUITestsAndroid.cs" />
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AppearingUITests.cs">
- <Link>Tests\AppearingUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AutomationIDUITests.cs">
- <Link>Tests\AutomationIDUITests.cs</Link>
- </Compile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
@@ -228,6 +95,7 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" />
+ <Import Project="..\Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
diff --git a/Xamarin.Forms.Core.iOS.UITests/BaseTestFixture.cs b/Xamarin.Forms.Core.UITests.Shared/BaseTestFixture.cs
index e6a38e40..78f9858d 100644
--- a/Xamarin.Forms.Core.iOS.UITests/BaseTestFixture.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/BaseTestFixture.cs
@@ -1,10 +1,5 @@
using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
using NUnit.Framework;
using Xamarin.Forms.Controls;
using Xamarin.UITest;
@@ -17,7 +12,9 @@ namespace Xamarin.Forms.Core.UITests
// TODO: Landscape tests
public static IApp App { get; set; }
+
public string PlatformViewType { get; protected set; }
+
public static AppRect ScreenBounds { get; set; }
[TestFixtureTearDown]
@@ -113,6 +110,7 @@ namespace Xamarin.Forms.Core.UITests
}
#if UITEST
+
namespace Xamarin.Forms.Core.UITests
{
using NUnit.Framework;
@@ -136,4 +134,5 @@ namespace Xamarin.Forms.Core.UITests
}
}
}
-#endif
+
+#endif \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/PlatformQueries.cs b/Xamarin.Forms.Core.UITests.Shared/PlatformQueries.cs
new file mode 100644
index 00000000..aeaaf556
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/PlatformQueries.cs
@@ -0,0 +1,278 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.UITest.Queries;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ internal static class PlatformMethodQueries
+ {
+#if __IOS__ || __MACOS__
+ public static readonly Dictionary<BindableProperty, Tuple<string[], bool>> PropertyPlatformMethodDictionary = new Dictionary<BindableProperty, Tuple<string[], bool>> {
+ { ActivityIndicator.ColorProperty, Tuple.Create (new[] { "color" }, false) },
+ { ActivityIndicator.IsRunningProperty, Tuple.Create (new[] { "isAnimating" }, false) },
+ { Button.BorderRadiusProperty, Tuple.Create (new[] { "layer", "cornerRadius" }, false) },
+ { Button.BorderWidthProperty, Tuple.Create (new[] { "layer", "borderWidth" }, false) },
+ { Button.FontProperty, Tuple.Create (new[] { "titleLabel", "font" }, false) },
+ { Button.TextProperty, Tuple.Create (new[] { "titleLabel", "text" }, false) },
+ { Button.TextColorProperty, Tuple.Create (new[] { "titleLabel", "textColor" }, false) },
+ { View.AnchorXProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ { View.AnchorYProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ { View.BackgroundColorProperty, Tuple.Create (new[] { "backgroundColor" }, false) },
+ { View.IsEnabledProperty, Tuple.Create (new[] { "isEnabled" }, false) },
+ { View.OpacityProperty, Tuple.Create (new [] { "alpha" }, true) },
+ { View.RotationProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ { View.RotationXProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ { View.RotationYProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ { View.ScaleProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
+ };
+
+#elif __ANDROID__ || __WINDOWS__
+ public static readonly Dictionary<BindableProperty, Tuple<string[], bool>> PropertyPlatformMethodDictionary = new Dictionary
+ <BindableProperty, Tuple<string[], bool>>
+ {
+ { ActivityIndicator.ColorProperty, Tuple.Create(new[] { "getProgressDrawable", "getColor" }, false) },
+ { ActivityIndicator.IsRunningProperty, Tuple.Create(new[] { "isIndeterminate" }, false) },
+ { Button.BorderColorProperty, Tuple.Create(new[] { "getBackground" }, false) },
+ { Button.BorderRadiusProperty, Tuple.Create(new[] { "getBackground" }, false) },
+ { Button.BorderWidthProperty, Tuple.Create(new[] { "getBackground" }, false) },
+ { Button.ImageProperty, Tuple.Create(new[] { "getBackground" }, false) },
+ { Button.FontProperty, Tuple.Create(new[] { "getTypeface", "isBold" }, false) },
+ { Button.TextProperty, Tuple.Create(new[] { "getText" }, false) },
+ { Button.TextColorProperty, Tuple.Create(new[] { "getCurrentTextColor" }, false) },
+ { View.AnchorXProperty, Tuple.Create(new[] { "getPivotX" }, true) },
+ { View.AnchorYProperty, Tuple.Create(new[] { "getPivotY" }, true) },
+ { View.BackgroundColorProperty, Tuple.Create(new[] { "getBackground", "getColor" }, true) },
+ { View.IsEnabledProperty, Tuple.Create(new[] { "isEnabled" }, false) },
+ { View.OpacityProperty, Tuple.Create(new[] { "getAlpha" }, true) },
+ { View.RotationProperty, Tuple.Create(new[] { "getRotation" }, true) },
+ { View.RotationXProperty, Tuple.Create(new[] { "getRotationX" }, true) },
+ { View.RotationYProperty, Tuple.Create(new[] { "getRotationY" }, true) },
+ { View.ScaleProperty, Tuple.Create(new[] { "getScaleX", "getScaleY" }, true) },
+ };
+#endif
+ }
+
+ internal static class PlatformViews
+ {
+#if __IOS__ || __MACOS__
+ public static readonly string ActivityIndicator = "UIActivityIndicatorView";
+ public static readonly string BoxView = "Xamarin_Forms_Platform_iOS_BoxRenderer";
+ public static readonly string Button = "UIButton";
+ public static readonly string DatePicker = "UITextField";
+ public static readonly string Editor = "UITextView";
+ public static readonly string Entry = "UITextField";
+ public static readonly string Frame = "view:'Xamarin_Forms_Platform_iOS_FrameRenderer'";
+ public static readonly string Image = "UIImageView";
+ public static readonly string Label = "UILabel";
+ public static readonly string ListView = "UITableView";
+ public static readonly string OpenGLView = "GLKView";
+ public static readonly string Picker = "UITextField";
+ public static readonly string ProgressBar = "UIProgressView";
+ public static readonly string SearchBar = "UISearchBar";
+ public static readonly string Slider = "UISlider";
+ public static readonly string Stepper = "UIStepper";
+ public static readonly string Switch = "UISwitch";
+ public static readonly string TableView = "UITableView";
+ public static readonly string TimePicker = "UITextField";
+ public static readonly string WebView = "UIWebView";
+#elif __ANDROID__ || __WINDOWS__
+ public static readonly string ActivityIndicator = "android.widget.ProgressBar";
+ public static readonly string BoxView = "xamarin.forms.platform.android.BoxRenderer";
+ public static readonly string Button = "android.widget.Button";
+ public static readonly string DatePicker = "android.widget.EditText";
+ public static readonly string Editor = "xamarin.forms.platform.android.EditorEditText";
+ public static readonly string Entry = "xamarin.forms.platform.android.EntryEditText";
+ public static readonly string Frame = "xamarin.forms.platform.android.appcompat.FrameRenderer";
+ public static readonly string Image = "android.widget.ImageView";
+ public static readonly string Label = "android.widget.TextView";
+ public static readonly string ListView = "android.widget.ListView";
+ public static readonly string OpenGLView = "android.widget.GLSurfaceView";
+ public static readonly string Picker = "android.widget.EditText";
+ public static readonly string ProgressBar = "android.widget.ProgressBar";
+ public static readonly string SearchBar = "android.widget.SearchView";
+ public static readonly string Slider = "android.widget.SeekBar";
+ public static readonly string Stepper = "button marked:'+'";
+ public static readonly string Switch = "android.widget.Switch";
+ public static readonly string TableView = "android.widget.ListView";
+ public static readonly string TimePicker = "android.widget.EditText";
+ public static readonly string WebView = "android.widget.WebView";
+#endif
+ }
+
+ internal static class PlatformQueries
+ {
+#if __IOS__ || __MACOS__
+ public static readonly Func<AppQuery, AppQuery> Root = q => q.Class("UIWindow");
+ public static readonly Func<AppQuery, AppQuery> RootPageListView = q => q.Class("Xamarin_Forms_Platform_iOS_ListViewRenderer index:0");
+ public static readonly Func<AppQuery, AppQuery> GalleryListView = q => q.Class("Xamarin_Forms_Platform_iOS_ListViewRenderer index:1");
+ public static readonly Func<AppQuery, AppQuery> PageWithoutNavigationBar = q => q.Raw("*").Index(7);
+ public static readonly Func<AppQuery, AppQuery> NavigationBarBackButton = q => q.Class("UINavigationItemButtonView");
+
+#elif __ANDROID__ || __WINDOWS__
+ public static readonly Func<AppQuery, AppQuery> Root = q => q.Id("content");
+ public static readonly Func<AppQuery, AppQuery> RootPageListView = q => q.Raw("ListViewRenderer index:0");
+ public static readonly Func<AppQuery, AppQuery> GalleryListView = q => q.Raw("ListViewRenderer index:1");
+ public static readonly Func<AppQuery, AppQuery> PageWithoutNavigationBar = q => q.Raw("* id:'content' index:0");
+
+ public static readonly Func<AppQuery, AppQuery> NavigationBarBackButton =
+ q => q.Class("android.support.v7.widget.Toolbar").Child("android.widget.ImageButton");
+#endif
+
+ // Controls
+ public static readonly Func<AppQuery, AppQuery> ActivityIndicator = q => q.ClassFull(PlatformViews.ActivityIndicator);
+ public static readonly Func<AppQuery, AppQuery> Button = q => q.ClassFull(PlatformViews.Button);
+
+#if __ANDROID__
+ public static Func<AppQuery, AppQuery> EntryWithPlaceholder(string text)
+ {
+ return q => q.Raw(string.Format("EntryEditText hint:'{0}'", text));
+ }
+ public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder(string text)
+ {
+ return q => q.Raw(string.Format("EntryCellEditText hint:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryWithText(string text)
+ {
+ return q => q.Raw(string.Format("EntryEditText text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryCellWithText(string text)
+ {
+ return q => q.Raw(string.Format("EntryCellEditText text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EditorsWithText(string text)
+ {
+ return q => q.Raw(string.Format("EditorEditText text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("EntryEditText index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> SearchBarWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("SearchView index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("TextView index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithText(string text)
+ {
+ return q => q.Raw(string.Format("TextView text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithId(string id)
+ {
+ return q => q.Raw(string.Format("TextView id:'{0}'", id));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("EditText index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithPlaceholder(string placeholder)
+ {
+ return q => q.Raw(string.Format("EditText hint:'{0}'", placeholder));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithText(string text)
+ {
+ return q => q.Raw(string.Format("EditText text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> SwitchWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("Switch index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> StepperWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("button marked:'+' index:{0}", index));
+ }
+
+#else
+ public static Func<AppQuery, AppQuery> EntryWithPlaceholder(string text)
+ {
+ return q => q.Raw(string.Format("TextField placeholder:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryWithText(string text)
+ {
+ return q => q.Raw(string.Format("TextField text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder(string text)
+ {
+ return q => q.Raw(string.Format("UITextFieldLabel text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryCellWithText(string text)
+ {
+ return q => q.Raw(string.Format("TextField text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EditorsWithText(string text)
+ {
+ return q => q.Raw(string.Format("TextView text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> EntryWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("TextField index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> SearchBarWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("SearchBar index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("Label index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithText(string text)
+ {
+ return q => q.Raw(string.Format("Label text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> LabelWithId(string id)
+ {
+ return q => q.Raw(string.Format("Label id:'{0}'", id));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("TextField index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithPlaceholder(string placeholder)
+ {
+ return q => q.Raw(string.Format("TextField placeholder:'{0}'", placeholder));
+ }
+
+ public static Func<AppQuery, AppQuery> PickerEntryWithText(string text)
+ {
+ return q => q.Raw(string.Format("TextField text:'{0}'", text));
+ }
+
+ public static Func<AppQuery, AppQuery> SwitchWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("Switch index:{0}", index));
+ }
+
+ public static Func<AppQuery, AppQuery> StepperWithIndex(int index)
+ {
+ return q => q.Raw(string.Format("Stepper index:{0}", index));
+ }
+#endif
+
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Queries.cs b/Xamarin.Forms.Core.UITests.Shared/Queries.cs
index e1c00ee9..199b3f25 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Queries.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Queries.cs
@@ -52,27 +52,6 @@ namespace Xamarin.Forms.Core.UITests
internal static class Queries
{
- #region Shared queries
- public static Func<AppQuery, AppQuery> RootPageListView = PlatformQueries.RootPageListView;
- public static Func<AppQuery, AppQuery> GalleryListView = PlatformQueries.GalleryListView;
-
- public static Func<AppQuery, AppQuery> ButtonWithText (string text)
- {
- return q => q.Button (text);
- }
-
- public static Func<AppQuery, AppQuery> ElementWithText (string text)
- {
- return q => q.Marked (text);
- }
-
- public static Func<AppQuery, AppQuery> All ()
- {
- return q => q.All ();
- }
-
- #endregion
-
#region Platform queries
public static Func<AppQuery, AppQuery> NavigationBarBackButton ()
@@ -90,16 +69,6 @@ namespace Xamarin.Forms.Core.UITests
return PlatformQueries.Root;
}
- public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder (string placeholder)
- {
- return PlatformQueries.EntryCellWithPlaceholder (placeholder);
- }
-
- public static Func<AppQuery, AppQuery> EntryCellWithText (string placeholder)
- {
- return PlatformQueries.EntryCellWithText (placeholder);
- }
-
#endregion
}
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs
index b0fc8f79..6a784e20 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs
@@ -1,26 +1,14 @@
using System;
-using System.Collections.Generic;
-using System.Configuration;
using System.Linq;
using System.Runtime.CompilerServices;
-using System.Runtime.Remoting.Messaging;
-using System.Security.Permissions;
-
-using NUnit.Framework;
-
using Xamarin.UITest;
using Xamarin.UITest.Queries;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
-using System.Globalization;
-
namespace Xamarin.Forms.Core.UITests
{
internal abstract class BaseViewContainerRemote
{
//bool requiresDismissal;
-
protected IApp App { get; private set; }
public string ViewQuery { get; private set; }
@@ -28,17 +16,20 @@ namespace Xamarin.Forms.Core.UITests
public string PlatformViewType { get; set; }
public string ContainerQuery { get; private set; }
+
public string ContainerDescendents { get; private set; }
public string EventLabelQuery { get; set; }
-
+
public string StateLabelQuery { get; private set; }
+
public string StateButtonQuery { get; private set; }
-
+
public string LayeredHiddenButtonQuery { get; private set; }
+
public string LayeredLabelQuery { get; private set; }
- protected BaseViewContainerRemote (IApp app, Enum formsType, string platformViewType)
+ protected BaseViewContainerRemote(IApp app, Enum formsType, string platformViewType)
{
App = app;
PlatformViewType = platformViewType;
@@ -48,26 +39,29 @@ namespace Xamarin.Forms.Core.UITests
ContainerQuery = string.Format("* marked:'{0}Container'", formsType);
ContainerDescendents = string.Format("* marked:'{0}Container' child *", formsType);
- ViewQuery = string.Format ("* marked:'{0}VisualElement'", formsType);
+ ViewQuery = string.Format("* marked:'{0}VisualElement'", formsType);
- EventLabelQuery = string.Format ("* marked:'{0}EventLabel'", formsType);
- StateLabelQuery = string.Format ("* marked:'{0}StateLabel'", formsType);
- StateButtonQuery = string.Format ("* marked:'{0}StateButton'", formsType);
- LayeredHiddenButtonQuery = string.Format ("* marked:'{0}LayeredHiddenButton'", formsType);
- LayeredLabelQuery = string.Format ("* marked:'{0}LayeredLabel'", formsType);
+ EventLabelQuery = string.Format("* marked:'{0}EventLabel'", formsType);
+ StateLabelQuery = string.Format("* marked:'{0}StateLabel'", formsType);
+ StateButtonQuery = string.Format("* marked:'{0}StateButton'", formsType);
+ LayeredHiddenButtonQuery = string.Format("* marked:'{0}LayeredHiddenButton'", formsType);
+ LayeredLabelQuery = string.Format("* marked:'{0}LayeredLabel'", formsType);
- if (platformViewType == PlatformViews.DatePicker) {
+ if (platformViewType == PlatformViews.DatePicker)
+ {
//requiresDismissal = true;
- }
+ }
}
- public virtual void GoTo ([CallerMemberName] string callerMemberName = "")
+ public virtual void GoTo([CallerMemberName] string callerMemberName = "")
{
- var scrollBounds = App.Query (Queries.PageWithoutNavigationBar ()).First ().Rect;
+ var scrollBounds = App.Query(Queries.PageWithoutNavigationBar()).First().Rect;
// Scroll using gutter to the right of view, avoid scrolling inside of WebView
- if (PlatformViewType == PlatformViews.WebView) {
- scrollBounds = new AppRect {
+ if (PlatformViewType == PlatformViews.WebView)
+ {
+ scrollBounds = new AppRect
+ {
X = scrollBounds.Width - 20,
CenterX = scrollBounds.Width - 10,
Y = scrollBounds.Y,
@@ -77,7 +71,6 @@ namespace Xamarin.Forms.Core.UITests
};
}
-
while (true)
{
#if __MACOS__
@@ -95,46 +88,47 @@ namespace Xamarin.Forms.Core.UITests
// ContainerQuery, new Drag (scrollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium)
//), "Failed to find element in: " + callerMemberName);
- App.Screenshot ("Go to element");
+ App.Screenshot("Go to element");
}
- public void TapView ()
+ public void TapView()
{
- App.Tap (q => q.Raw (ViewQuery));
+ App.Tap(q => q.Raw(ViewQuery));
}
- public void DismissPopOver ()
+ public void DismissPopOver()
{
- App.Screenshot ("About to dismiss pop over");
- App.Tap (q => q.Button ("Done"));
- App.Screenshot ("Pop over dismissed");
+ App.Screenshot("About to dismiss pop over");
+ App.Tap(q => q.Button("Done"));
+ App.Screenshot("Pop over dismissed");
}
- public AppResult GetView ()
+ public AppResult GetView()
{
- return App.Query (q => q.Raw (ViewQuery)).First ();
+ return App.Query(q => q.Raw(ViewQuery)).First();
}
- public AppResult[] GetViews ()
+ public AppResult[] GetViews()
{
- return App.Query (q => q.Raw (ViewQuery));
+ return App.Query(q => q.Raw(ViewQuery));
}
- public AppResult[] GetContainerDescendants ()
+ public AppResult[] GetContainerDescendants()
{
- return App.Query (q => q.Raw (ContainerDescendents));
+ return App.Query(q => q.Raw(ContainerDescendents));
}
- public T GetProperty<T> (BindableProperty formProperty)
+ public T GetProperty<T>(BindableProperty formProperty)
{
- Tuple<string[], bool> property = formProperty.GetPlatformPropertyQuery ();
- string[] propertyPath = property.Item1;
+ Tuple<string[], bool> property = formProperty.GetPlatformPropertyQuery();
+ string[] propertyPath = property.Item1;
bool isOnParentRenderer = property.Item2;
var query = ViewQuery;
- if (isOnParentRenderer &&
- PlatformViewType != PlatformViews.BoxView &&
- PlatformViewType != PlatformViews.Frame) {
+ if (isOnParentRenderer &&
+ PlatformViewType != PlatformViews.BoxView &&
+ PlatformViewType != PlatformViews.Frame)
+ {
query = query + " parent * index:0";
}
@@ -184,21 +178,24 @@ namespace Xamarin.Forms.Core.UITests
}
#endif
- if (!found || prop == null) {
- throw new NullReferenceException ("null property");
+ if (!found || prop == null)
+ {
+ throw new NullReferenceException("null property");
}
- if (prop.GetType () == typeof(T))
+ if (prop.GetType() == typeof(T))
return (T)prop;
- if (prop.GetType () == typeof(string) && typeof(T) == typeof(Matrix)) {
- Matrix matrix = ParsingUtils.ParseCATransform3D ((string)prop);
+ if (prop.GetType() == typeof(string) && typeof(T) == typeof(Matrix))
+ {
+ Matrix matrix = ParsingUtils.ParseCATransform3D((string)prop);
return (T)((object)matrix);
}
- if (typeof(T) == typeof(Color)) {
+ if (typeof(T) == typeof(Color))
+ {
#if __IOS__
- Color color = ParsingUtils.ParseUIColor ((string)prop);
+ Color color = ParsingUtils.ParseUIColor((string)prop);
return (T)((object)color);
#else
uint intColor = (uint)((float)prop);
@@ -208,69 +205,85 @@ namespace Xamarin.Forms.Core.UITests
}
#if __IOS__
- if (prop.GetType () == typeof (string) && typeof(T) == typeof(Font)) {
- Font font = ParsingUtils.ParseUIFont ((string)prop);
+ if (prop.GetType() == typeof(string) && typeof(T) == typeof(Font))
+ {
+ Font font = ParsingUtils.ParseUIFont((string)prop);
return (T)((object)font);
}
#endif
T result = default(T);
- var stringToBoolConverter = new StringToBoolConverter ();
- var floatToBoolConverter = new FloatToBoolConverter ();
+ var stringToBoolConverter = new StringToBoolConverter();
+ var floatToBoolConverter = new FloatToBoolConverter();
- if (stringToBoolConverter.CanConvertTo (prop, typeof(bool))) {
- result = (T)stringToBoolConverter.ConvertTo (prop, typeof(bool));
- } else if (floatToBoolConverter.CanConvertTo (prop, typeof(bool))) {
- result = (T)floatToBoolConverter.ConvertTo (prop, typeof(bool));
+ if (stringToBoolConverter.CanConvertTo(prop, typeof(bool)))
+ {
+ result = (T)stringToBoolConverter.ConvertTo(prop, typeof(bool));
}
-
+ else if (floatToBoolConverter.CanConvertTo(prop, typeof(bool)))
+ {
+ result = (T)floatToBoolConverter.ConvertTo(prop, typeof(bool));
+ }
+
return result;
}
static bool MaybeGetProperty<T>(IApp app, string query, string[] propertyPath, out object result)
{
-
- try {
- switch (propertyPath.Length){
- case 1:
- result = app.Query (q => q.Raw (query).Invoke (propertyPath[0]).Value<T> ()).First ();
- break;
- case 2:
- result = app.Query (q => q.Raw (query).Invoke (propertyPath[0]).Invoke (propertyPath[1]).Value<T> ()).First ();
- break;
- case 3:
- result = app.Query (q => q.Raw (query).Invoke (propertyPath[0]).Invoke (propertyPath[1]).Invoke (propertyPath[2]).Value<T> ()).First ();
- break;
- case 4:
- result = app.Query (q => q.Raw (query).Invoke (propertyPath[0]).Invoke (propertyPath[1]).Invoke (propertyPath[2]).Invoke(propertyPath[3]).Value<T> ()).First ();
- break;
- default:
- result = null;
- return false;
+ try
+ {
+ switch (propertyPath.Length)
+ {
+ case 1:
+ result = app.Query(q => q.Raw(query).Invoke(propertyPath[0]).Value<T>()).First();
+ break;
+ case 2:
+ result = app.Query(q => q.Raw(query).Invoke(propertyPath[0]).Invoke(propertyPath[1]).Value<T>()).First();
+ break;
+ case 3:
+ result =
+ app.Query(q => q.Raw(query).Invoke(propertyPath[0]).Invoke(propertyPath[1]).Invoke(propertyPath[2]).Value<T>())
+ .First();
+ break;
+ case 4:
+ result =
+ app.Query(
+ q =>
+ q.Raw(query)
+ .Invoke(propertyPath[0])
+ .Invoke(propertyPath[1])
+ .Invoke(propertyPath[2])
+ .Invoke(propertyPath[3])
+ .Value<T>()).First();
+ break;
+ default:
+ result = null;
+ return false;
}
}
- catch {
+ catch
+ {
result = null;
return false;
}
return true;
}
-
}
internal class StringToBoolConverter : TypeConverter
{
- public override bool CanConvertTo (object source, Type targetType)
+ public override bool CanConvertTo(object source, Type targetType)
{
if (targetType != typeof(bool) || !(source is string))
return false;
var str = (string)source;
- str = str.ToLowerInvariant ();
+ str = str.ToLowerInvariant();
- switch (str) {
+ switch (str)
+ {
case "0":
case "1":
case "false":
@@ -281,7 +294,7 @@ namespace Xamarin.Forms.Core.UITests
}
}
- public override object ConvertTo (object source, Type targetType)
+ public override object ConvertTo(object source, Type targetType)
{
var str = (string)source;
str = str.ToLowerInvariant();
@@ -299,24 +312,24 @@ namespace Xamarin.Forms.Core.UITests
internal class FloatToBoolConverter : TypeConverter
{
- public override bool CanConvertTo (object source, Type targetType)
+ public override bool CanConvertTo(object source, Type targetType)
{
if (targetType != typeof(bool) || !(source is float))
return false;
var flt = (float)source;
var epsilon = 0.0001;
- if (Math.Abs (flt - 1.0f) < epsilon || Math.Abs (flt - 0.0f) < epsilon)
+ if (Math.Abs(flt - 1.0f) < epsilon || Math.Abs(flt - 0.0f) < epsilon)
return true;
else
return false;
}
- public override object ConvertTo (object source, Type targetType)
+ public override object ConvertTo(object source, Type targetType)
{
var flt = (float)source;
var epsilon = 0.0001;
- if (Math.Abs (flt - 1.0f) < epsilon)
+ if (Math.Abs(flt - 1.0f) < epsilon)
return true;
else
return false;
@@ -325,16 +338,16 @@ namespace Xamarin.Forms.Core.UITests
internal abstract class TypeConverter
{
- public abstract bool CanConvertTo (object source, Type targetType);
+ public abstract bool CanConvertTo(object source, Type targetType);
- public abstract object ConvertTo (object source, Type targetType);
+ public abstract object ConvertTo(object source, Type targetType);
}
- internal static class PlatformMethods
- {
- public static Tuple<string[], bool> GetPlatformPropertyQuery (this BindableProperty bindableProperty)
- {
- return PlatformMethodQueries.PropertyPlatformMethodDictionary[bindableProperty];
- }
- }
+ internal static class PlatformMethods
+ {
+ public static Tuple<string[], bool> GetPlatformPropertyQuery(this BindableProperty bindableProperty)
+ {
+ return PlatformMethodQueries.PropertyPlatformMethodDictionary[bindableProperty];
+ }
+ }
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Remotes/EventViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/EventViewContainerRemote.cs
new file mode 100644
index 00000000..66d5602b
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/EventViewContainerRemote.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Linq;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ internal sealed class EventViewContainerRemote : BaseViewContainerRemote
+ {
+ public EventViewContainerRemote(IApp app, Enum formsType, string platformViewType)
+ : base(app, formsType, platformViewType)
+ {
+ }
+
+ public AppResult GetEventLabel()
+ {
+ App.WaitForElement(q => q.Raw(EventLabelQuery));
+ return App.Query(q => q.Raw(EventLabelQuery)).First();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Remotes/LayeredViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/LayeredViewContainerRemote.cs
new file mode 100644
index 00000000..d0ef9f63
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/LayeredViewContainerRemote.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Linq;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ internal sealed class LayeredViewContainerRemote : BaseViewContainerRemote
+ {
+ public LayeredViewContainerRemote(IApp app, Enum formsType, string platformViewType)
+ : base(app, formsType, platformViewType)
+ {
+ }
+
+ public AppResult GetLayeredLabel()
+ {
+ return App.Query(q => q.Raw(LayeredLabelQuery)).First();
+ }
+
+ public void TapHiddenButton()
+ {
+ App.Tap(q => q.Raw(LayeredHiddenButtonQuery));
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Remotes/StateViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/StateViewContainerRemote.cs
new file mode 100644
index 00000000..053fe3d8
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/StateViewContainerRemote.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Linq;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ internal sealed class StateViewContainerRemote : BaseViewContainerRemote
+ {
+ public StateViewContainerRemote(IApp app, Enum formsType, string platformViewType)
+ : base(app, formsType, platformViewType)
+ {
+ }
+
+ public void TapStateButton()
+ {
+ App.Screenshot("Before state change");
+ App.Tap(q => q.Raw(StateButtonQuery));
+ App.Screenshot("After state change");
+ }
+
+ public AppResult GetStateLabel()
+ {
+ return App.Query(q => q.Raw(StateLabelQuery)).First();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/ViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/ViewContainerRemote.cs
index f19d3e6b..98b7cacc 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/ViewContainerRemote.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/ViewContainerRemote.cs
@@ -1,7 +1,5 @@
using System;
-
using Xamarin.UITest;
-using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
{
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ActionSheetUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ActionSheetUITests.cs
index 88d280e5..88d280e5 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ActionSheetUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ActionSheetUITests.cs
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/ActivityIndicatorUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ActivityIndicatorUITests.cs
new file mode 100644
index 00000000..1667aa34
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ActivityIndicatorUITests.cs
@@ -0,0 +1,69 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.ActivityIndicator)]
+ internal class ActivityIndicatorUITests : _ViewUITests
+ {
+ public ActivityIndicatorUITests()
+ {
+ PlatformViewType = Views.ActivityIndicator;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.ActivityIndicatorGallery);
+ }
+
+ // View tests
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ public override void _GestureRecognizers()
+ {
+ // TODO Can implement this
+ var remote = new ViewContainerRemote(App, Test.View.GestureRecognizers, PlatformViewType);
+ remote.GoTo();
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // ActivityIndicator tests
+ [Test]
+ [UiTest(typeof(ActivityIndicator), "IsRunning")]
+ public void IsRunning()
+ {
+ var remote = new ViewContainerRemote(App, Test.ActivityIndicator.IsRunning, PlatformViewType);
+ remote.GoTo();
+#if __MACOS__
+ Assert.Inconclusive("Not tested yet");
+#else
+ var isRunning = remote.GetProperty<bool> (ActivityIndicator.IsRunningProperty);
+ Assert.IsTrue (isRunning);
+#endif
+ }
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/AppearingUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/AppearingUITests.cs
new file mode 100644
index 00000000..b38fd418
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/AppearingUITests.cs
@@ -0,0 +1,66 @@
+using NUnit.Framework;
+
+namespace Xamarin.Forms.Core.UITests
+{
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
+ [Category(UITestCategories.LifeCycle)]
+ internal class AppearingUITests : BaseTestFixture
+ {
+ public AppearingUITests()
+ {
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.AppearingGallery);
+ }
+
+ protected override void TestTearDown()
+ {
+ base.TestTearDown();
+ ResetApp();
+ NavigateToGallery();
+ }
+
+ [Test]
+ public void AppearingNavigationPage()
+ {
+ App.Tap(t => t.Marked("NavAppearingPage"));
+ App.WaitForElement("Appearing NavAppearingPage");
+ App.WaitForElement("Appearing Page 1");
+ App.Tap(t => t.Marked("Push new Page"));
+ App.WaitForElement("Disappearing Page 1");
+ App.WaitForElement("Appearing Page 2");
+ App.Tap(t => t.Marked("Change Main Page"));
+ App.WaitForElement("Disappearing Page 2");
+ App.WaitForElement("Disappearing NavAppearingPage");
+ App.WaitForElement("Appearing Page 3");
+ }
+
+ [Test]
+ public void AppearingCarouselPage()
+ {
+ App.Tap(t => t.Marked("CarouselAppearingPage"));
+ App.WaitForElement("Appearing CarouselAppearingPage");
+ App.WaitForElement("Appearing Page 1");
+ }
+
+ [Test]
+ public void AppearingTabbedPage()
+ {
+ App.Tap(t => t.Marked("TabbedAppearingPage"));
+ App.WaitForElement("Appearing TabbedAppearingPage");
+ App.WaitForElement("Appearing Page 1");
+ }
+
+ [Test]
+ public void AppearingMasterDetailPage()
+ {
+ App.Tap(t => t.Marked("MasterAppearingPage"));
+ App.WaitForElement("Appearing MasterAppearingPage");
+ App.WaitForElement("Appearing Page 1");
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/AutomationIDUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/AutomationIDUITests.cs
index 9b814a92..9b814a92 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/AutomationIDUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/AutomationIDUITests.cs
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/BoxViewUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/BoxViewUITests.cs
new file mode 100644
index 00000000..a99363dc
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/BoxViewUITests.cs
@@ -0,0 +1,57 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
+ [Category(UITestCategories.BoxView)]
+ internal class BoxViewUITests : _ViewUITests
+ {
+ public BoxViewUITests()
+ {
+ PlatformViewType = Views.BoxView;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.BoxViewGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/ButtonUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ButtonUITests.cs
new file mode 100644
index 00000000..83dff100
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ButtonUITests.cs
@@ -0,0 +1,172 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Button)]
+ internal class ButtonUITests : _ViewUITests
+ {
+ public ButtonUITests()
+ {
+ PlatformViewType = Views.Button;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.ButtonGallery);
+ }
+
+ // View Tests
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // Button Tests
+ [Test]
+ [UiTest(typeof(Button), "BorderColor")]
+ [UiTestBroken(BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
+ [UiTestBroken(BrokenReason.CalabashiOSUnsupported, "iOS nil result")]
+ public void BorderColor()
+ {
+ //TODO iOS
+ var remote = new ViewContainerRemote(App, Test.Button.BorderColor, PlatformViewType);
+ remote.GoTo();
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "BorderRadius")]
+ [UiTestBroken(BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
+ public void BorderRadius()
+ {
+ var remote = new ViewContainerRemote(App, Test.Button.BorderRadius, PlatformViewType);
+ remote.GoTo();
+
+#if __IOS__
+ var borderRadius = remote.GetProperty<float>(Button.BorderRadiusProperty);
+ Assert.AreEqual(20.0f, borderRadius);
+#endif
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "BorderWidth")]
+ [UiTestBroken(BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
+ public void BorderWidth()
+ {
+ var remote = new ViewContainerRemote(App, Test.Button.BorderWidth, PlatformViewType);
+ remote.GoTo();
+
+#if __IOS__
+ var borderWidth = remote.GetProperty<float>(Button.BorderWidthProperty);
+ Assert.AreEqual(15.0f, borderWidth);
+#endif
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "Clicked")]
+ public void Clicked()
+ {
+ var remote = new EventViewContainerRemote(App, Test.Button.Clicked, PlatformViewType);
+ remote.GoTo();
+
+ var textBeforeClick = remote.GetEventLabel().Text;
+ Assert.AreEqual("Event: Clicked (none)", textBeforeClick);
+
+ // Click Button
+ remote.TapView();
+
+ var textAfterClick = remote.GetEventLabel().Text;
+ Assert.AreEqual("Event: Clicked (fired 1)", textAfterClick);
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "Command")]
+ public void Command()
+ {
+ var remote = new ViewContainerRemote(App, Test.Button.Command, PlatformViewType);
+ remote.GoTo();
+
+ remote.TapView();
+
+ App.WaitForElement(q => q.Marked("Hello Command"));
+ App.Tap(q => q.Marked("Destroy"));
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "Font")]
+ public void Font()
+ {
+ //TODO iOS
+ var remote = new ViewContainerRemote(App, Test.Button.Font, PlatformViewType);
+ remote.GoTo();
+
+#if __ANDROID__
+ var isBold = remote.GetProperty<bool> (Button.FontProperty);
+ Assert.True (isBold);
+#elif __MACOS__
+ Assert.Inconclusive("needs testing");
+#else
+ var font = remote.GetProperty<Font>(Button.FontProperty);
+ Assert.True(font.FontAttributes.HasFlag(FontAttributes.Bold));
+#endif
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "Image")]
+ [UiTestExempt(ExemptReason.TimeConsuming, "Need way to check Android resources")]
+ public void Image()
+ {
+ //TODO iOS
+ var remote = new ViewContainerRemote(App, Test.Button.Image, PlatformViewType);
+ remote.GoTo();
+ }
+
+ [Test]
+ [UiTest(typeof(Button), "Text")]
+ public void Text()
+ {
+ var remote = new ViewContainerRemote(App, Test.Button.Text, PlatformViewType);
+ remote.GoTo();
+
+ var buttonText = remote.GetProperty<string>(Button.TextProperty);
+ Assert.AreEqual("Text", buttonText);
+ }
+
+ //TODO iOS
+
+#if __ANDROID__
+ [Test]
+ [UiTest (typeof (Button), "TextColor")]
+ public void TextColor ()
+ {
+ var remote = new ViewContainerRemote (App, Test.Button.TextColor, PlatformViewType);
+ remote.GoTo ();
+
+ var buttonTextColor = remote.GetProperty<Color> (Button.TextColorProperty);
+ Assert.AreEqual (Color.Pink, buttonTextColor);
+ }
+#endif
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ContextActionsUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ContextActionsUITests.cs
index cd0b3643..cd0b3643 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ContextActionsUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ContextActionsUITests.cs
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/DatePickerUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/DatePickerUITests.cs
new file mode 100644
index 00000000..4e176df2
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/DatePickerUITests.cs
@@ -0,0 +1,50 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.DatePicker)]
+ internal class DatePickerUITests : _ViewUITests
+ {
+ public DatePickerUITests()
+ {
+ PlatformViewType = Views.DatePicker;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.DatePickerGallery);
+ }
+
+ // View Tests
+ // 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
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/DisplayAlertUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/DisplayAlertUITests.cs
new file mode 100644
index 00000000..ce935dc9
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/DisplayAlertUITests.cs
@@ -0,0 +1,58 @@
+using NUnit.Framework;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.DisplayAlert)]
+ internal class DisplayAlertUITests : BaseTestFixture
+ {
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.DisplayAlertGallery);
+ }
+
+ [Test]
+ public void TestWithCancelButton()
+ {
+ App.Tap(c => c.Marked("Alert Override1"));
+ App.Screenshot("Display Alert");
+ App.WaitForElement(c => c.Marked("TheAlertTitle"));
+ App.WaitForElement(c => c.Marked("TheAlertMessage"));
+ App.WaitForElement(c => c.Marked("TheCancelButton"));
+ App.Screenshot("Display Alert Closed");
+ App.Tap(c => c.Marked("TheCancelButton"));
+ App.WaitForNoElement(c => c.Marked("TheAlertTitle"));
+ }
+
+ [Test]
+ public void TestWithCancelAndOkButton()
+ {
+ App.Tap(c => c.Marked("Alert Override2"));
+ App.Screenshot("Display Alert");
+ App.WaitForElement(c => c.Marked("TheAlertTitle"));
+ App.WaitForElement(c => c.Marked("TheAlertMessage"));
+ App.WaitForElement(c => c.Marked("TheAcceptButton"));
+ App.WaitForElement(c => c.Marked("TheCancelButton"));
+ App.Tap(c => c.Marked("TheCancelButton"));
+ App.Screenshot("Display Alert Closed");
+ App.WaitForNoElement(c => c.Marked("TheAlertTitle"));
+ }
+
+ [Test]
+ public void TestOkAndCancelResults()
+ {
+ App.Tap(c => c.Marked("Alert Override2"));
+ App.Screenshot("Display Alert");
+ App.WaitForElement(c => c.Marked("TheCancelButton"));
+ App.Tap(c => c.Marked("TheCancelButton"));
+ App.Screenshot("Display Alert Closed with cancel");
+ App.WaitForElement(c => c.Marked("Result: False"));
+ App.Tap(c => c.Marked("test2"));
+ App.Screenshot("Display Alert");
+ App.WaitForElement(c => c.Marked("TheAcceptButton"));
+ App.Tap(c => c.Marked("TheAcceptButton"));
+ App.Screenshot("Display Alert Closed with True");
+ App.WaitForElement(c => c.Marked("Result: True"));
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/EditorUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/EditorUITests.cs
new file mode 100644
index 00000000..b2739b5c
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/EditorUITests.cs
@@ -0,0 +1,50 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Editor)]
+ internal class EditorUITests : _ViewUITests
+ {
+ public EditorUITests()
+ {
+ PlatformViewType = Views.Editor;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.EditorGallery);
+ }
+
+ // View Tests
+ // 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
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/EntryUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/EntryUITests.cs
new file mode 100644
index 00000000..80d2095f
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/EntryUITests.cs
@@ -0,0 +1,63 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.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");
+
+ 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
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/FrameUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/FrameUITests.cs
new file mode 100644
index 00000000..469c8a5a
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/FrameUITests.cs
@@ -0,0 +1,57 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
+ [TestFixture]
+ [Category(UITestCategories.Frame)]
+ internal class FrameUITests : _ViewUITests
+ {
+ public FrameUITests()
+ {
+ PlatformViewType = Views.Frame;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.FrameGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/ImageUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ImageUITests.cs
new file mode 100644
index 00000000..0b2aa849
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ImageUITests.cs
@@ -0,0 +1,61 @@
+using System.Threading;
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Image)]
+ internal class ImageUITests : _ViewUITests
+ {
+ public ImageUITests()
+ {
+ PlatformViewType = Views.Image;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.ImageGallery);
+
+ // let remote images load
+ Thread.Sleep(2000);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ // TODO
+ // Tests for remote images
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/LabelUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/LabelUITests.cs
new file mode 100644
index 00000000..8b0dd311
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/LabelUITests.cs
@@ -0,0 +1,54 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Label)]
+ internal class LabelUITests : _ViewUITests
+ {
+ public LabelUITests()
+ {
+ PlatformViewType = Views.Label;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.LabelGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-CellsUITests.cs
index 24732519..45b3436c 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-CellsUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-CellsUITests.cs
@@ -1,14 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
-
using Xamarin.Forms.CustomAttributes;
-using Xamarin.UITest;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
{
@@ -33,13 +27,15 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(TextCell))]
public void CellsGalleryTextCellList()
{
- App.ScrollForElement("* marked:'TextCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'TextCell List'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("TextCell List"));
App.WaitForElement(q => q.Marked("Text 0"), "Timeout : Text 0");
App.Screenshot("At TextCell List Gallery");
- App.ScrollForElement("* marked:'Detail 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Detail 99'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.WaitForElement(q => q.Marked("Detail 99"), "Timeout : Detail 99");
@@ -52,14 +48,16 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(TextCell))]
public void CellsGalleryTextCellTable()
{
- App.ScrollForElement("* marked:'TextCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'TextCell Table'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("TextCell Table"));
App.WaitForElement(q => q.Marked("Text 1"), "Timeout : Text 1");
App.Screenshot("At TextCell Table Gallery");
- App.ScrollForElement("* marked:'Detail 12'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Detail 12'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.WaitForElement(q => q.Marked("Detail 12"), "Timeout : Detail 12");
@@ -74,7 +72,8 @@ namespace Xamarin.Forms.Core.UITests
{
Thread.Sleep(2000);
- App.ScrollForElement("* marked:'ImageCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'ImageCell List'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
Thread.Sleep(2000);
@@ -84,7 +83,8 @@ namespace Xamarin.Forms.Core.UITests
App.Screenshot("At ImageCell List Gallery");
var scollBounds = App.Query(q => q.Marked("ImageCellListView")).First().Rect;
- App.ScrollForElement("* marked:'Detail 99'", new Drag(scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Detail 99'",
+ new Drag(scollBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.WaitForElement(q => q.Marked("Detail 99"), "Timeout : Detail 99");
@@ -105,8 +105,8 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(ImageCell))]
public async Task CellsGalleryImageUrlCellList()
{
-
- App.ScrollForElement("* marked:'ImageCell Url List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'ImageCell Url List'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("ImageCell Url List"));
@@ -138,23 +138,22 @@ namespace Xamarin.Forms.Core.UITests
App.Screenshot("Images are present");
}
-
-
-
[Test]
[Description("TableView with ImageCells, all are present")]
[UiTest(typeof(TableView))]
[UiTest(typeof(ImageCell))]
public void CellsGalleryImageCellTable()
{
- App.ScrollForElement("* marked:'ImageCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'ImageCell Table'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("ImageCell Table"));
App.WaitForElement(q => q.Marked("Text 1"), "Timeout : Text 1");
App.Screenshot("At ImageCell Table Gallery");
- App.ScrollForElement("* marked:'Detail 12'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Detail 12'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.WaitForElement(q => q.Marked("Detail 12"), "Timeout : Detail 12");
@@ -174,14 +173,16 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(SwitchCell))]
public void CellsGallerySwitchCellList()
{
- App.ScrollForElement("* marked:'SwitchCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'SwitchCell List'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("SwitchCell List"));
App.WaitForElement(q => q.Marked("Label 0"), "Timeout : Label 0");
App.Screenshot("At SwitchCell List Gallery");
- App.ScrollForElement("* marked:'Label 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Label 99'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
var numberOfSwitches = App.Query(q => q.Raw(PlatformViews.Switch)).Length;
Assert.IsTrue(numberOfSwitches > 2);
@@ -195,7 +196,8 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(SwitchCell))]
public void CellsGallerySwitchCellTable()
{
- App.ScrollForElement("* marked:'SwitchCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'SwitchCell Table'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("SwitchCell Table"));
App.WaitForElement(q => q.Marked("text 1"), "Timeout : text 1");
@@ -216,14 +218,16 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(EntryCell))]
public void CellsGalleryEntryCellList()
{
- App.ScrollForElement("* marked:'EntryCell List'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'EntryCell List'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("EntryCell List"));
App.WaitForElement(q => q.Marked("Label 0"), "Timeout : Label 0");
App.Screenshot("At EntryCell List Gallery");
- App.ScrollForElement("* marked:'Label 99'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Label 99'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Screenshot("All EntryCells are present");
}
@@ -234,7 +238,8 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(EntryCell))]
public void CellsGalleryEntryCellTable()
{
- App.ScrollForElement("* marked:'EntryCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'EntryCell Table'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("EntryCell Table"));
App.WaitForElement(q => q.Marked("Text 2"), "Timeout : Text 2");
@@ -252,13 +257,15 @@ namespace Xamarin.Forms.Core.UITests
[UiTest(typeof(EntryCell), "Completed")]
public void CellsGalleryEntryCellCompleted()
{
- App.ScrollForElement("* marked:'EntryCell Table'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'EntryCell Table'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Tap(q => q.Marked("EntryCell Table"));
App.WaitForElement(q => q.Marked("Text 2"), "Timeout : Text 2");
App.Screenshot("At EntryCell Table Gallery");
- App.ScrollForElement("* marked:'Enter text'", new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
+ App.ScrollForElement("* marked:'Enter text'",
+ new Drag(ScreenBounds, Drag.Direction.BottomToTop, Drag.DragLength.Medium));
App.Screenshot("Before clicking Entry");
@@ -280,5 +287,4 @@ namespace Xamarin.Forms.Core.UITests
base.TestTearDown();
}
}
-}
-
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-UnevenListTests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-UnevenListTests.cs
index 7e0cebf1..34ca2a9a 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-UnevenListTests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/Legacy-UnevenListTests.cs
@@ -5,20 +5,20 @@ using Xamarin.UITest.iOS;
namespace Xamarin.Forms.Core.UITests
{
[TestFixture]
- [Category ("Cells")]
+ [Category("Cells")]
internal class UnevenListTests : BaseTestFixture
{
- public UnevenListTests ()
+ public UnevenListTests()
{
}
- protected override void NavigateToGallery ()
+ protected override void NavigateToGallery()
{
- App.NavigateToGallery (GalleryQueries.UnevenListGalleryLegacy);
+ App.NavigateToGallery(GalleryQueries.UnevenListGalleryLegacy);
}
[Test]
- public void UnevenListCellTest ()
+ public void UnevenListCellTest()
{
if (UnevenListTests.ShouldRunTest(App))
{
@@ -28,11 +28,10 @@ namespace Xamarin.Forms.Core.UITests
}
}
- public static bool ShouldRunTest (IApp app)
+ public static bool ShouldRunTest(IApp app)
{
var appAs = app as iOSApp;
return (appAs != null && appAs.Device.IsPhone);
}
-
}
-}
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/PickerUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/PickerUITests.cs
index f0bd20a1..9628c4a0 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/PickerUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/PickerUITests.cs
@@ -1,18 +1,6 @@
-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
{
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/ProgressBarUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ProgressBarUITests.cs
new file mode 100644
index 00000000..63eceb60
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ProgressBarUITests.cs
@@ -0,0 +1,54 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.ProgressBar)]
+ internal class ProgressBarUITests : _ViewUITests
+ {
+ public ProgressBarUITests()
+ {
+ PlatformViewType = Views.ProgressBar;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.ProgressBarGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsEnabled()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/RootGalleryUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/RootGalleryUITests.cs
new file mode 100644
index 00000000..b55fc23e
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/RootGalleryUITests.cs
@@ -0,0 +1,93 @@
+using NUnit.Framework;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ internal sealed class RootPageModel
+ {
+ public string ButtonId { get; private set; }
+
+ public string PageId { get; private set; }
+
+ public bool IsModal { get; private set; }
+
+ public RootPageModel(string buttonId, string pageId, bool isModal = false)
+ {
+ ButtonId = buttonId;
+ PageId = pageId;
+ IsModal = isModal;
+ }
+ }
+
+ [TestFixture]
+ [Category(UITestCategories.RootGallery)]
+ internal class RootGalleryUITests : BaseTestFixture
+ {
+ readonly IEnumerable<RootPageModel> rootPages;
+
+ public RootGalleryUITests()
+ {
+ string[] ids =
+ {
+ "Content",
+ "Nav->Content",
+ "MDP->Nav->Content",
+ "Tab->Content",
+ "Tab->MDP->Nav->Content",
+ "Tab->Nav->Content",
+ "Tab(Many)->Nav->Content",
+ "Nav->Tab->Content(BAD IDEA)",
+ "Nav->Tab(Many)->Content(BAD IDEA)",
+ "MDP->Nav->Tab->Content(BAD IDEA)"
+ };
+ string[] modalIds =
+ {
+ "(Modal)Content",
+ "(Modal)Nav->Content",
+ "(Modal)MDP->Nav->Content",
+ "(Modal)Tab->Content",
+ "(Modal)Tab->MDP->Nav->Content",
+ "(Modal)Tab->Nav->Content",
+ "(Modal)Tab(Many)->Nav->Content",
+ "(Modal)Nav->Tab->Content(BAD IDEA)",
+ "(Modal)Nav->Tab(Many)->Content(BAD IDEA)",
+ "(Modal)MDP->Nav->Tab->Content(BAD IDEA)",
+ };
+
+ rootPages =
+ (from id in ids
+ select new RootPageModel(id + "ButtonId", id + "PageId")).Union(
+ from id in modalIds
+ select new RootPageModel(id + "ButtonId", id + "PageId", true));
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.RootPagesGallery);
+ }
+
+ [Test]
+ [Ignore("Ignore while we dont't have a response from XTC team why this fails some times")]
+ public void VisitEachPage()
+ {
+ foreach (var page in rootPages)
+ {
+ var scrollViewArea = App.Query(q => q.Marked("ChoosePageScrollView")).First().Rect;
+ App.ScrollForElement(string.Format("* marked:'{0}'", page.ButtonId),
+ new Drag(scrollViewArea, Drag.Direction.BottomToTop, Drag.DragLength.Long));
+ App.Tap(q => q.Marked(page.ButtonId));
+
+ bool ios = false;
+#if __IOS__
+ ios = true;
+#endif
+
+ if (!page.IsModal || ios)
+ App.WaitForElement(q => q.Marked(page.PageId));
+
+ App.Screenshot("Page: " + page.PageId);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ScrollViewUITests.cs
index 3319834a..fa057636 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ScrollViewUITests.cs
@@ -1,5 +1,4 @@
using NUnit.Framework;
-using Xamarin.UITest;
namespace Xamarin.Forms.Core.UITests
{
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/SearchBarUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/SearchBarUITests.cs
index 9f9f3e97..2b25d275 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/SearchBarUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/SearchBarUITests.cs
@@ -1,18 +1,5 @@
-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
{
@@ -44,7 +31,6 @@ namespace Xamarin.Forms.Core.UITests
// TODO
// Implement control specific ui tests
-
protected override void FixtureTeardown ()
{
App.NavigateBack ();
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/SliderUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/SliderUITests.cs
new file mode 100644
index 00000000..eceed80b
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/SliderUITests.cs
@@ -0,0 +1,48 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Slider)]
+ internal class SliderUITests : _ViewUITests
+ {
+ public SliderUITests()
+ {
+ PlatformViewType = Views.Slider;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.SliderGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/StepperUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/StepperUITests.cs
new file mode 100644
index 00000000..1aa69af8
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/StepperUITests.cs
@@ -0,0 +1,48 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Stepper)]
+ internal class StepperUITests : _ViewUITests
+ {
+ public StepperUITests()
+ {
+ PlatformViewType = Views.Stepper;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.StepperGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/SwitchUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/SwitchUITests.cs
new file mode 100644
index 00000000..f2e1fe25
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/SwitchUITests.cs
@@ -0,0 +1,48 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.Switch)]
+ internal class SwitchUITests : _ViewUITests
+ {
+ public SwitchUITests()
+ {
+ PlatformViewType = Views.Switch;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.SwitchGallery);
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _IsFocused()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/TimePickerUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/TimePickerUITests.cs
new file mode 100644
index 00000000..db093dc8
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/TimePickerUITests.cs
@@ -0,0 +1,51 @@
+using System.Threading;
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.TimePicker)]
+ internal class TimePickerUITests : _ViewUITests
+ {
+ public TimePickerUITests()
+ {
+ PlatformViewType = Views.TimePicker;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.TimePickerGallery);
+
+ Thread.Sleep(4000);
+ }
+
+ // 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
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ToolbarItemTests.cs
index 0231ca57..0231ca57 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ToolbarItemTests.cs
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/ViewUITests.cs
index 9029f2aa..9029f2aa 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/ViewUITests.cs
diff --git a/Xamarin.Forms.Core.UITests.Shared/Tests/WebViewUITests.cs b/Xamarin.Forms.Core.UITests.Shared/Tests/WebViewUITests.cs
new file mode 100644
index 00000000..08ff5146
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Tests/WebViewUITests.cs
@@ -0,0 +1,111 @@
+using NUnit.Framework;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Core.UITests
+{
+ [TestFixture]
+ [Category(UITestCategories.WebView)]
+ internal class WebViewUITests : _ViewUITests
+ {
+ public WebViewUITests()
+ {
+ PlatformViewType = Views.WebView;
+ }
+
+ protected override void NavigateToGallery()
+ {
+ App.NavigateToGallery(GalleryQueries.WebViewGallery);
+ }
+
+ [Category(UITestCategories.ManualReview)]
+ public override void _IsEnabled()
+ {
+ Assert.Inconclusive("Does not make sense for WebView");
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _IsVisible()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction with Label")]
+ public override void _Focus()
+ {
+ }
+
+ // TODO
+ public override void _GestureRecognizers()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction with Label")]
+ public override void _IsFocused()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _Opacity()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _Rotation()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _RotationX()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _RotationY()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _TranslationX()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _TranslationY()
+ {
+ }
+
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ [Ignore("Keep empty test from failing in Test Cloud")]
+ public override void _Scale()
+ {
+ }
+
+ [UiTestExempt(ExemptReason.CannotTest, "Invalid interaction with Label")]
+ public override void _UnFocus()
+ {
+ }
+
+ // TODO
+ // Implement control specific ui tests
+
+ protected override void FixtureTeardown()
+ {
+ App.NavigateBack();
+ base.FixtureTeardown();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/UITestCategories.cs b/Xamarin.Forms.Core.UITests.Shared/UITestCategories.cs
index 28a6fff4..28a6fff4 100644
--- a/Xamarin.Forms.Core.iOS.UITests/UITestCategories.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/UITestCategories.cs
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/AppExtensions.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/AppExtensions.cs
index b5f52b9c..b5f52b9c 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/AppExtensions.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/AppExtensions.cs
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/Drag.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/Drag.cs
index 71b1fa03..59f54819 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/Drag.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/Drag.cs
@@ -1,5 +1,3 @@
-using System.Reflection.Emit;
-
using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/Gestures.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs
index 548ff06d..f998267b 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/Gestures.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/Gestures.cs
@@ -1,11 +1,6 @@
using System;
-using System.Dynamic;
using System.Linq;
-using System.Security.Cryptography;
-
using Xamarin.UITest;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/Logger.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/Logger.cs
index ed0041ae..fe5e5d77 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/Logger.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/Logger.cs
@@ -1,6 +1,4 @@
-using System;
using System.IO;
-using System.Reflection;
using Xamarin.UITest.Queries;
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/NumericExtensions.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/NumericExtensions.cs
index 13a4b2bf..353856d1 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/NumericExtensions.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/NumericExtensions.cs
@@ -1,16 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.Remoting.Messaging;
-
-using NUnit.Framework;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
-using System.Globalization;
namespace Xamarin.Forms.Core.UITests
{
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/ParsingUtils.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/ParsingUtils.cs
index 6598e0f5..95568fd8 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/ParsingUtils.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/ParsingUtils.cs
@@ -1,19 +1,7 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.Remoting.Messaging;
-
-using NUnit.Framework;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
using System.Globalization;
-using System.Text.RegularExpressions;
-using System.IO;
-
+using System.Linq;
namespace Xamarin.Forms.Core.UITests
{
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/UITestCustomExceptions.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/UITestCustomExceptions.cs
index 6969ac52..3d17a99c 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/UITestCustomExceptions.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/UITestCustomExceptions.cs
@@ -1,10 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using Xamarin.UITest.Queries;
using System.Runtime.CompilerServices;
namespace Xamarin.Forms.Core.UITests
diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs b/Xamarin.Forms.Core.UITests.Shared/Utilities/ViewInspector.cs
index 9bc5347b..38f42da8 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs
+++ b/Xamarin.Forms.Core.UITests.Shared/Utilities/ViewInspector.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
+using Xamarin.UITest;
using System.Linq;
namespace Xamarin.Forms.Core.UITests
diff --git a/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.Shared.shproj b/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.Shared.shproj
new file mode 100644
index 00000000..891616fc
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.Shared.shproj
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>e175485b-3c8c-47d7-8dd5-f7fed627eb25</ProjectGuid>
+ <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
+ <PropertyGroup />
+ <Import Project="Xamarin.Forms.Core.UITests.projitems" Label="Shared" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
+</Project>
diff --git a/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.projitems b/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.projitems
new file mode 100644
index 00000000..4168b071
--- /dev/null
+++ b/Xamarin.Forms.Core.UITests.Shared/Xamarin.Forms.Core.UITests.projitems
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+ <HasSharedItems>true</HasSharedItems>
+ <SharedGUID>e175485b-3c8c-47d7-8dd5-f7fed627eb25</SharedGUID>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <Import_RootNamespace>Xamarin.Forms.Core.UITests.Shared</Import_RootNamespace>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildThisFileDirectory)BaseTestFixture.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)PlatformQueries.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Queries.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Remotes\BaseViewContainerRemote.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Remotes\EventViewContainerRemote.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Remotes\LayeredViewContainerRemote.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Remotes\StateViewContainerRemote.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Remotes\ViewContainerRemote.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ActionSheetUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ActivityIndicatorUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\AppearingUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\AutomationIDUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\BoxViewUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ButtonUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ContextActionsUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\DatePickerUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\DisplayAlertUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\EditorUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\EntryUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\FrameUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ImageUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\LabelUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\Legacy-CellsUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\Legacy-UnevenListTests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\PickerUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ProgressBarUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\RootGalleryUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ScrollViewUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\SearchBarUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\SliderUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\StepperUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\SwitchUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\TimePickerUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ToolbarItemTests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\ViewUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Tests\WebViewUITests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UITestCategories.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\AppExtensions.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\Drag.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\Gestures.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\Logger.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\NumericExtensions.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\ParsingUtils.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\UITestCustomExceptions.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Utilities\ViewInspector.cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Xamarin.Forms.Core.Windows.UITests/App.cs b/Xamarin.Forms.Core.Windows.UITests/App.cs
deleted file mode 100644
index 8c0ddc0f..00000000
--- a/Xamarin.Forms.Core.Windows.UITests/App.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xamarin.UITest;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal static class RunningApp
- {
- public static IApp App;
-
- public static void Restart ()
- {
- App = null;
- }
- }
-}
diff --git a/Xamarin.Forms.Core.Windows.UITests/PlatformQueries.cs b/Xamarin.Forms.Core.Windows.UITests/PlatformQueries.cs
deleted file mode 100644
index 9599d5d3..00000000
--- a/Xamarin.Forms.Core.Windows.UITests/PlatformQueries.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal static class PlatformMethodQueries
- {
- public static readonly Dictionary<BindableProperty, Tuple<string[], bool>> PropertyPlatformMethodDictionary = new Dictionary<BindableProperty, Tuple<string[], bool>> {
- { ActivityIndicator.ColorProperty, Tuple.Create (new[] { "getProgressDrawable", "getColor" }, false) },
- { ActivityIndicator.IsRunningProperty, Tuple.Create (new[] { "isIndeterminate" }, false) },
- { Button.BorderColorProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.BorderRadiusProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.BorderWidthProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.ImageProperty, Tuple.Create (new[] { "getBackground" }, false) },
- { Button.FontProperty, Tuple.Create (new[] { "getTypeface", "isBold" }, false) },
- { Button.TextProperty, Tuple.Create (new[] { "getText" }, false) },
- { Button.TextColorProperty, Tuple.Create (new[] { "getCurrentTextColor" }, false) },
- { View.AnchorXProperty, Tuple.Create (new[] { "getPivotX" }, true) },
- { View.AnchorYProperty, Tuple.Create (new[] { "getPivotY" }, true) },
- { View.BackgroundColorProperty, Tuple.Create (new[] { "getBackground", "getColor" }, true) },
- { View.IsEnabledProperty, Tuple.Create (new[] { "isEnabled" }, false) },
- { View.OpacityProperty, Tuple.Create (new[] { "getAlpha" }, true) },
- { View.RotationProperty, Tuple.Create (new[] { "getRotation" }, true) },
- { View.RotationXProperty, Tuple.Create (new[] { "getRotationX" }, true) },
- { View.RotationYProperty, Tuple.Create (new[] { "getRotationY" }, true) },
- { View.ScaleProperty, Tuple.Create (new[] { "getScaleX", "getScaleY" }, true) },
- };
- }
-
- internal static class PlatformViews
- {
- public static readonly string ActivityIndicator = "android.widget.ProgressBar";
- public static readonly string BoxView = "xamarin.forms.platform.android.BoxRenderer";
- public static readonly string Button = "android.widget.Button";
- public static readonly string DatePicker = "android.widget.EditText";
- public static readonly string Editor = "xamarin.forms.platform.android.EditorEditText";
- public static readonly string Entry = "xamarin.forms.platform.android.EntryEditText";
- public static readonly string Frame = "xamarin.forms.platform.android.appcompat.FrameRenderer";
- public static readonly string Image = "android.widget.ImageView";
- public static readonly string Label = "android.widget.TextView";
- public static readonly string ListView = "android.widget.ListView";
- public static readonly string OpenGLView = "android.widget.GLSurfaceView";
- public static readonly string Picker = "android.widget.EditText";
- public static readonly string ProgressBar = "android.widget.ProgressBar";
- public static readonly string SearchBar = "android.widget.SearchView";
- public static readonly string Slider = "android.widget.SeekBar";
- public static readonly string Stepper = "button marked:'+'";
- public static readonly string Switch = "android.widget.Switch";
- public static readonly string TableView = "android.widget.ListView";
- public static readonly string TimePicker = "android.widget.EditText";
- public static readonly string WebView = "android.widget.WebView";
- }
-
- internal static class PlatformQueries
- {
- public static readonly Func<AppQuery, AppQuery> Root = q => q.Id ("content");
- public static readonly Func<AppQuery, AppQuery> RootPageListView = q => q.Raw ("ListViewRenderer index:0");
- public static readonly Func<AppQuery, AppQuery> GalleryListView = q => q.Raw ("ListViewRenderer index:1");
- public static readonly Func<AppQuery, AppQuery> PageWithoutNavigationBar = q => q.Raw ("* id:'content' index:0");
- public static readonly Func<AppQuery, AppQuery> NavigationBarBackButton = q => q.Class ("android.support.v7.widget.Toolbar").Child ("android.widget.ImageButton");
-
- // Views
- public static readonly Func<AppQuery, AppQuery> ActivityIndicator = q => q.ClassFull (PlatformViews.ActivityIndicator);
- public static readonly Func<AppQuery, AppQuery> Button = q => q.ClassFull (PlatformViews.Button);
-
- public static Func<AppQuery, AppQuery> EntryWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("EntryEditText hint:'{0}'", text));
- }
- public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("EntryCellEditText hint:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithText (string text) {
- return q => q.Raw (string.Format ("EntryEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryCellWithText (string text) {
- return q => q.Raw (string.Format ("EntryCellEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EditorsWithText (string text) {
- return q => q.Raw (string.Format ("EditorEditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithIndex (int index) {
- return q => q.Raw (string.Format ("EntryEditText index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> SearchBarWithIndex (int index) {
- return q => q.Raw (string.Format ("SearchView index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithIndex (int index) {
- return q => q.Raw (string.Format ("TextView index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithText (string text) {
- return q => q.Raw (string.Format ("TextView text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithId (string id) {
- return q => q.Raw (string.Format ("TextView id:'{0}'", id));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithIndex (int index) {
- return q => q.Raw (string.Format ("EditText index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithPlaceholder (string placeholder) {
- return q => q.Raw (string.Format ("EditText hint:'{0}'", placeholder));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithText (string text) {
- return q => q.Raw (string.Format ("EditText text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> SwitchWithIndex (int index) {
- return q => q.Raw (string.Format ("Switch index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> StepperWithIndex (int index) {
- return q => q.Raw (string.Format ("button marked:'+' index:{0}", index));
- }
- }
-}
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 f297b073..972ac120 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
@@ -52,140 +52,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\BaseTestFixture.cs">
- <Link>BaseTestFixture.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Queries.cs">
- <Link>Queries.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\BaseViewContainerRemote.cs">
- <Link>Remotes\BaseViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\EventViewContainerRemote.cs">
- <Link>Remotes\EventViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\LayeredViewContainerRemote.cs">
- <Link>Remotes\LayeredViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\RemoteFactory.cs">
- <Link>Remotes\RemoteFactory.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\StateViewContainerRemote.cs">
- <Link>Remotes\StateViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\ViewContainerRemote.cs">
- <Link>Remotes\ViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActionSheetUITests.cs">
- <Link>Tests\ActionSheetUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActivityIndicatorUITests.cs">
- <Link>Tests\ActivityIndicatorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AutomationIDUITests.cs">
- <Link>Tests\AutomationIDUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\BoxViewUITests.cs">
- <Link>Tests\BoxViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ButtonUITests.cs">
- <Link>Tests\ButtonUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ContextActionsUITests.cs">
- <Link>Tests\ContextActionsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DatePickerUITests.cs">
- <Link>Tests\DatePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DisplayAlertUITests.cs">
- <Link>Tests\DisplayAlertUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EditorUITests.cs">
- <Link>Tests\EditorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EntryUITests.cs">
- <Link>Tests\EntryUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\FrameUITests.cs">
- <Link>Tests\FrameUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ImageUITests.cs">
- <Link>Tests\ImageUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\LabelUITests.cs">
- <Link>Tests\LabelUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-CellsUITests.cs">
- <Link>Tests\Legacy-CellsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-UnevenListTests.cs">
- <Link>Tests\Legacy-UnevenListTests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\PickerUITests.cs">
- <Link>Tests\PickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ProgressBarUITests.cs">
- <Link>Tests\ProgressBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\RootGalleryUITests.cs">
- <Link>Tests\RootGalleryUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ScrollViewUITests.cs">
- <Link>Tests\ScrollViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SearchBarUITests.cs">
- <Link>Tests\SearchBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SliderUITests.cs">
- <Link>Tests\SliderUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\StepperUITests.cs">
- <Link>Tests\StepperUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SwitchUITests.cs">
- <Link>Tests\SwitchUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\TimePickerUITests.cs">
- <Link>Tests\TimePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ToolbarItemTests.cs">
- <Link>Tests\ToolbarItemTests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ViewUITests.cs">
- <Link>Tests\ViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\WebViewUITests.cs">
- <Link>Tests\WebViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\UITestCategories.cs">
- <Link>UITestCategories.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\AppExtensions.cs">
- <Link>Utilities\AppExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Drag.cs">
- <Link>Utilities\Drag.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Gestures.cs">
- <Link>Utilities\Gestures.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Logger.cs">
- <Link>Utilities\Logger.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\NumericExtensions.cs">
- <Link>Utilities\NumericExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ParsingUtils.cs">
- <Link>Utilities\ParsingUtils.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\UITestCustomExceptions.cs">
- <Link>Utilities\UITestCustomExceptions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ViewInspector.cs">
- <Link>Utilities\ViewInspector.cs</Link>
- </Compile>
- <Compile Include="App.cs" />
- <Compile Include="PlatformQueries.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -213,6 +79,7 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" />
+ <Import Project="..\Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/Xamarin.Forms.Core.iOS.UITests/PlatformQueries.cs b/Xamarin.Forms.Core.iOS.UITests/PlatformQueries.cs
deleted file mode 100644
index 4ae2515c..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/PlatformQueries.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using Xamarin.UITest.iOS;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal static class iOSLoaderIdentifier
- {
-
- }
-
- internal static class PlatformMethodQueries
- {
- public static readonly Dictionary<BindableProperty, Tuple<string[], bool>> PropertyPlatformMethodDictionary = new Dictionary<BindableProperty, Tuple<string[], bool>> {
- { ActivityIndicator.ColorProperty, Tuple.Create (new[] { "color" }, false) },
- { ActivityIndicator.IsRunningProperty, Tuple.Create (new[] { "isAnimating" }, false) },
- { Button.BorderRadiusProperty, Tuple.Create (new[] { "layer", "cornerRadius" }, false) },
- { Button.BorderWidthProperty, Tuple.Create (new[] { "layer", "borderWidth" }, false) },
- { Button.FontProperty, Tuple.Create (new[] { "titleLabel", "font" }, false) },
- { Button.TextProperty, Tuple.Create (new[] { "titleLabel", "text" }, false) },
- { Button.TextColorProperty, Tuple.Create (new[] { "titleLabel", "textColor" }, false) },
- { View.AnchorXProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- { View.AnchorYProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- { View.BackgroundColorProperty, Tuple.Create (new[] { "backgroundColor" }, false) },
- { View.IsEnabledProperty, Tuple.Create (new[] { "isEnabled" }, false) },
- { View.OpacityProperty, Tuple.Create (new [] { "alpha" }, true) },
- { View.RotationProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- { View.RotationXProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- { View.RotationYProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- { View.ScaleProperty, Tuple.Create (new[] { "layer", "transform" }, true) },
- };
- }
-
- internal static class PlatformViews
- {
- public static readonly string ActivityIndicator = "UIActivityIndicatorView";
- public static readonly string BoxView = "Xamarin_Forms_Platform_iOS_BoxRenderer";
- public static readonly string Button = "UIButton";
- public static readonly string DatePicker = "UITextField";
- public static readonly string Editor = "UITextView";
- public static readonly string Entry = "UITextField";
- public static readonly string Frame = "view:'Xamarin_Forms_Platform_iOS_FrameRenderer'";
- public static readonly string Image = "UIImageView";
- public static readonly string Label = "UILabel";
- public static readonly string ListView = "UITableView";
- public static readonly string OpenGLView = "GLKView";
- public static readonly string Picker = "UITextField";
- public static readonly string ProgressBar = "UIProgressView";
- public static readonly string SearchBar = "UISearchBar";
- public static readonly string Slider = "UISlider";
- public static readonly string Stepper = "UIStepper";
- public static readonly string Switch = "UISwitch";
- public static readonly string TableView = "UITableView";
- public static readonly string TimePicker = "UITextField";
- public static readonly string WebView = "UIWebView";
- }
-
- internal static class PlatformQueries
- {
- public static readonly Func<AppQuery, AppQuery> Root = q => q.Class ("UIWindow");
- public static readonly Func<AppQuery, AppQuery> RootPageListView = q => q.Class ("Xamarin_Forms_Platform_iOS_ListViewRenderer index:0");
- public static readonly Func<AppQuery, AppQuery> GalleryListView = q => q.Class ("Xamarin_Forms_Platform_iOS_ListViewRenderer index:1");
- public static readonly Func<AppQuery, AppQuery> PageWithoutNavigationBar = q => q.Raw ("*").Index (7);
- public static readonly Func<AppQuery, AppQuery> NavigationBarBackButton = q => q.Class ("UINavigationItemButtonView");
-
- // Controls
- public static readonly Func<AppQuery, AppQuery> ActivityIndicator = q => q.ClassFull (PlatformViews.ActivityIndicator);
- public static readonly Func<AppQuery, AppQuery> Button = q => q.ClassFull (PlatformViews.Button);
-
- public static Func<AppQuery, AppQuery> EntryWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("TextField placeholder:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithText (string text) {
- return q => q.Raw (string.Format ("TextField text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryCellWithPlaceholder (string text) {
- return q => q.Raw (string.Format ("UITextFieldLabel text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryCellWithText (string text) {
- return q => q.Raw (string.Format ("TextField text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EditorsWithText (string text) {
- return q => q.Raw (string.Format ("TextView text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> EntryWithIndex (int index) {
- return q => q.Raw (string.Format ("TextField index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> SearchBarWithIndex (int index) {
- return q => q.Raw (string.Format ("SearchBar index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithIndex (int index) {
- return q => q.Raw (string.Format ("Label index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithText (string text) {
- return q => q.Raw (string.Format ("Label text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> LabelWithId (string id) {
- return q => q.Raw (string.Format ("Label id:'{0}'", id));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithIndex (int index) {
- return q => q.Raw (string.Format ("TextField index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithPlaceholder (string placeholder) {
- return q => q.Raw (string.Format ("TextField placeholder:'{0}'", placeholder));
- }
-
- public static Func<AppQuery, AppQuery> PickerEntryWithText (string text) {
- return q => q.Raw (string.Format ("TextField text:'{0}'", text));
- }
-
- public static Func<AppQuery, AppQuery> SwitchWithIndex (int index) {
- return q => q.Raw (string.Format ("Switch index:{0}", index));
- }
-
- public static Func<AppQuery, AppQuery> StepperWithIndex (int index) {
- return q => q.Raw (string.Format ("Stepper index:{0}", index));
- }
-
- }
-}
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/EventViewContainerRemote.cs b/Xamarin.Forms.Core.iOS.UITests/Remotes/EventViewContainerRemote.cs
deleted file mode 100644
index d603974d..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/EventViewContainerRemote.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Linq;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal sealed class EventViewContainerRemote : BaseViewContainerRemote
- {
- public EventViewContainerRemote (IApp app, Enum formsType, string platformViewType)
- : base (app, formsType, platformViewType) { }
-
- public AppResult GetEventLabel ()
- {
- App.WaitForElement (q => q.Raw (EventLabelQuery));
- return App.Query (q => q.Raw (EventLabelQuery)).First ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/LayeredViewContainerRemote.cs b/Xamarin.Forms.Core.iOS.UITests/Remotes/LayeredViewContainerRemote.cs
deleted file mode 100644
index 6f6c1071..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/LayeredViewContainerRemote.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Linq;
-using System.Security.Cryptography.X509Certificates;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal sealed class LayeredViewContainerRemote : BaseViewContainerRemote
- {
- public LayeredViewContainerRemote (IApp app, Enum formsType, string platformViewType)
- : base (app, formsType, platformViewType) {}
-
- public AppResult GetLayeredLabel ()
- {
- return App.Query (q => q.Raw (LayeredLabelQuery)).First ();
- }
-
- public void TapHiddenButton ()
- {
- App.Tap (q => q.Raw (LayeredHiddenButtonQuery));
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/RemoteFactory.cs b/Xamarin.Forms.Core.iOS.UITests/Remotes/RemoteFactory.cs
deleted file mode 100644
index ec9757ef..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/RemoteFactory.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
-
-// Potential cleanup of Raw Queries
-// public void MyTest(IApp app)
-// {
-// var viewName = "myView";
-//
-// app.Query (x => x.Marked (viewName + " View").Parent ().Index (0).Sibling ().Index (1).Child (0).Child (0));
-//
-// app.Query (x => x.Marked (viewName + " View").Parent (0).Sibling (1).Child (0).Child (0));
-//
-// app.Query (x => x.LayeredHiddenButton ("mine").LayeredHiddenButton ("yours"));
-//
-// app.Query (x => x.LayeredHiddenButton (viewName).Parentx(4));
-//
-// app.ForAndroid (x => {
-// x.Back();
-// });
-// }
-
-
-// Potential cleanup of Raw Queries
-// make public or reflection will not pick up in REPL
-// internal static class Exts
-// {
-// public static void ForAndroid(this IApp app, Action<AndroidApp> action)
-// {
-// if (app is AndroidApp)
-// {
-// action (app as AndroidApp);
-// }
-// }
-//
-// public static AppQuery LayeredHiddenButton(this AppQuery query, string viewName)
-// {
-// if(query.QueryPlatform == QueryPlatform.Android)
-// {
-// return query.Marked (viewName + " Android View").Parent (0).Sibling (1).Child (0).Child (0);
-//
-// }
-// return query.Marked (viewName + " iOS View").Parent (0).Sibling (1).Child (0).Child (0);
-// }
-//
-// public static AppQuery Parentx(this AppQuery query, int index)
-// {
-// return query.Parent ().Index (index);
-// }
-// }
-
-}
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/StateViewContainerRemote.cs b/Xamarin.Forms.Core.iOS.UITests/Remotes/StateViewContainerRemote.cs
deleted file mode 100644
index 2d7a1172..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Remotes/StateViewContainerRemote.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-using NUnit.Framework;
-
-using Xamarin.UITest;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal sealed class StateViewContainerRemote : BaseViewContainerRemote
- {
- public StateViewContainerRemote (IApp app, Enum formsType, string platformViewType)
- : base(app, formsType, platformViewType) { }
-
- public void TapStateButton ()
- {
- App.Screenshot ("Before state change");
- App.Tap (q => q.Raw (StateButtonQuery));
- App.Screenshot ("After state change");
- }
-
- public AppResult GetStateLabel ()
- {
- return App.Query (q => q.Raw (StateLabelQuery)).First ();
- }
- }
-}
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ActivityIndicatorUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ActivityIndicatorUITests.cs
deleted file mode 100644
index 86d0d750..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ActivityIndicatorUITests.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-
-using NUnit.Framework;
-
-using Xamarin.Forms.CustomAttributes;
-using Xamarin.UITest.Queries;
-
-namespace Xamarin.Forms.Core.UITests
-{
- [TestFixture]
- [Category(UITestCategories.ActivityIndicator)]
- internal class ActivityIndicatorUITests : _ViewUITests
- {
- public ActivityIndicatorUITests ()
- {
- PlatformViewType = Views.ActivityIndicator;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.ActivityIndicatorGallery);
- }
-
- // View tests
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- public override void _GestureRecognizers ()
- {
- // TODO Can implement this
- var remote = new ViewContainerRemote (App, Test.View.GestureRecognizers, PlatformViewType);
- remote.GoTo ();
- }
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // ActivityIndicator tests
- [Test]
- [UiTest (typeof(ActivityIndicator), "IsRunning")]
- public void IsRunning ()
- {
- var remote = new ViewContainerRemote(App, Test.ActivityIndicator.IsRunning, PlatformViewType);
- remote.GoTo();
-#if __MACOS__
- Assert.Inconclusive("Not tested yet");
-#else
- var isRunning = remote.GetProperty<bool> (ActivityIndicator.IsRunningProperty);
- Assert.IsTrue (isRunning);
-#endif
- }
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
-
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/AppearingUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/AppearingUITests.cs
deleted file mode 100644
index 568663ab..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/AppearingUITests.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using NUnit.Framework;
-
-namespace Xamarin.Forms.Core.UITests
-{
-#if __MACOS__
- [Ignore("Not tested on the MAC")]
-#endif
- [Category(UITestCategories.LifeCycle)]
- internal class AppearingUITests : BaseTestFixture
- {
- public AppearingUITests()
- {
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.AppearingGallery);
- }
-
- protected override void TestTearDown()
- {
- base.TestTearDown();
- ResetApp();
- NavigateToGallery();
- }
-
- [Test]
- public void AppearingNavigationPage ()
- {
- App.Tap (t => t.Marked ("NavAppearingPage"));
- App.WaitForElement ("Appearing NavAppearingPage");
- App.WaitForElement ("Appearing Page 1");
- App.Tap (t => t.Marked ("Push new Page"));
- App.WaitForElement ("Disappearing Page 1");
- App.WaitForElement ("Appearing Page 2");
- App.Tap (t => t.Marked ("Change Main Page"));
- App.WaitForElement ("Disappearing Page 2");
- App.WaitForElement ("Disappearing NavAppearingPage");
- App.WaitForElement ("Appearing Page 3");
- }
-
-
- [Test]
- public void AppearingCarouselPage ()
- {
- App.Tap (t => t.Marked ("CarouselAppearingPage"));
- App.WaitForElement ("Appearing CarouselAppearingPage");
- App.WaitForElement ("Appearing Page 1");
-
- }
-
- [Test]
- public void AppearingTabbedPage ()
- {
- App.Tap (t => t.Marked ("TabbedAppearingPage"));
- App.WaitForElement ("Appearing TabbedAppearingPage");
- App.WaitForElement ("Appearing Page 1");
-
- }
-
- [Test]
- public void AppearingMasterDetailPage ()
- {
- App.Tap (t => t.Marked ("MasterAppearingPage"));
- App.WaitForElement ("Appearing MasterAppearingPage");
- App.WaitForElement ("Appearing Page 1");
-
- }
- }
-}
-
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/BoxViewUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/BoxViewUITests.cs
deleted file mode 100644
index 6def5ed0..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/BoxViewUITests.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-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]
-#if __MACOS__
- [Ignore("Not tested on the MAC")]
-#endif
- [Category(UITestCategories.BoxView)]
- internal class BoxViewUITests : _ViewUITests
- {
- public BoxViewUITests ()
- {
- PlatformViewType = Views.BoxView;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.BoxViewGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
deleted file mode 100644
index 89994a98..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-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(UITestCategories.Button)]
- internal class ButtonUITests : _ViewUITests
- {
- public ButtonUITests ()
- {
- PlatformViewType = Views.Button;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.ButtonGallery);
- }
-
- // View Tests
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // Button Tests
- [Test]
- [UiTest (typeof(Button),"BorderColor")]
- [UiTestBroken (BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
- [UiTestBroken (BrokenReason.CalabashiOSUnsupported, "iOS nil result")]
- public void BorderColor ()
- {
- //TODO iOS
- var remote = new ViewContainerRemote (App, Test.Button.BorderColor, PlatformViewType);
- remote.GoTo ();
-
- }
-
- [Test]
- [UiTest (typeof (Button), "BorderRadius")]
- [UiTestBroken (BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
- public void BorderRadius ()
- {
- var remote = new ViewContainerRemote (App, Test.Button.BorderRadius, PlatformViewType);
- remote.GoTo ();
-
-#if __IOS__
- var borderRadius = remote.GetProperty<float> (Button.BorderRadiusProperty);
- Assert.AreEqual (20.0f, borderRadius);
-#endif
-
- }
-
- [Test]
- [UiTest (typeof (Button), "BorderWidth")]
- [UiTestBroken (BrokenReason.CalabashAndroidUnsupported, "Figure out how to get Android Drawables")]
- public void BorderWidth ()
- {
- var remote = new ViewContainerRemote (App, Test.Button.BorderWidth, PlatformViewType);
- remote.GoTo ();
-
-#if __IOS__
- var borderWidth = remote.GetProperty<float> (Button.BorderWidthProperty);
- Assert.AreEqual (15.0f, borderWidth);
-#endif
-
- }
-
- [Test]
- [UiTest (typeof (Button), "Clicked")]
- public void Clicked ()
- {
- var remote = new EventViewContainerRemote (App, Test.Button.Clicked, PlatformViewType);
- remote.GoTo ();
-
- var textBeforeClick = remote.GetEventLabel ().Text;
- Assert.AreEqual ("Event: Clicked (none)", textBeforeClick);
-
- // Click Button
- remote.TapView ();
-
- var textAfterClick = remote.GetEventLabel ().Text;
- Assert.AreEqual ("Event: Clicked (fired 1)", textAfterClick);
- }
-
- [Test]
- [UiTest (typeof (Button), "Command")]
- public void Command ()
- {
- var remote = new ViewContainerRemote (App, Test.Button.Command, PlatformViewType);
- remote.GoTo ();
-
- remote.TapView ();
-
- App.WaitForElement (q => q.Marked ("Hello Command"));
- App.Tap (q => q.Marked ("Destroy"));
- }
-
- [Test]
- [UiTest (typeof (Button), "Font")]
- public void Font ()
- {
- //TODO iOS
- var remote = new ViewContainerRemote (App, Test.Button.Font, PlatformViewType);
- remote.GoTo ();
-
-#if __ANDROID__
- var isBold = remote.GetProperty<bool> (Button.FontProperty);
- Assert.True (isBold);
-#elif __MACOS__
- Assert.Inconclusive("needs testing");
-#else
- var font = remote.GetProperty<Font> (Button.FontProperty);
- Assert.True (font.FontAttributes.HasFlag (FontAttributes.Bold));
-#endif
- }
-
- [Test]
- [UiTest (typeof (Button), "Image")]
- [UiTestExempt (ExemptReason.TimeConsuming, "Need way to check Android resources")]
- public void Image ()
- {
- //TODO iOS
- var remote = new ViewContainerRemote (App, Test.Button.Image, PlatformViewType);
- remote.GoTo ();
- }
-
- [Test]
- [UiTest (typeof (Button), "Text")]
- public void Text ()
- {
- var remote = new ViewContainerRemote (App, Test.Button.Text, PlatformViewType);
- remote.GoTo ();
-
- var buttonText = remote.GetProperty<string> (Button.TextProperty);
- Assert.AreEqual ("Text", buttonText);
- }
-
- //TODO iOS
-
-#if __ANDROID__
- [Test]
- [UiTest (typeof (Button), "TextColor")]
- public void TextColor ()
- {
- var remote = new ViewContainerRemote (App, Test.Button.TextColor, PlatformViewType);
- remote.GoTo ();
-
- var buttonTextColor = remote.GetProperty<Color> (Button.TextColorProperty);
- Assert.AreEqual (Color.Pink, buttonTextColor);
- }
-#endif
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/DatePickerUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/DatePickerUITests.cs
deleted file mode 100644
index 72452886..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/DatePickerUITests.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-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(UITestCategories.DatePicker)]
- internal class DatePickerUITests : _ViewUITests
- {
- public DatePickerUITests ()
- {
- PlatformViewType = Views.DatePicker;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.DatePickerGallery);
- }
-
- // View Tests
- // 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
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/DisplayAlertUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/DisplayAlertUITests.cs
deleted file mode 100644
index afefdebc..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/DisplayAlertUITests.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using NUnit.Framework;
-using Xamarin.UITest;
-using System;
-using System.Threading;
-
-namespace Xamarin.Forms.Core.UITests
-{
- [TestFixture]
- [Category(UITestCategories.DisplayAlert)]
- internal class DisplayAlertUITests : BaseTestFixture
- {
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.DisplayAlertGallery);
- }
-
- [Test]
- public void TestWithCancelButton ()
- {
-
- App.Tap (c => c.Marked ("Alert Override1"));
- App.Screenshot ("Display Alert");
- App.WaitForElement (c => c.Marked ("TheAlertTitle"));
- App.WaitForElement (c => c.Marked ("TheAlertMessage"));
- App.WaitForElement (c => c.Marked ("TheCancelButton"));
- App.Screenshot ("Display Alert Closed");
- App.Tap (c => c.Marked ("TheCancelButton"));
- App.WaitForNoElement (c => c.Marked ("TheAlertTitle"));
- }
-
- [Test]
- public void TestWithCancelAndOkButton ()
- {
- App.Tap (c => c.Marked ("Alert Override2"));
- App.Screenshot ("Display Alert");
- App.WaitForElement (c => c.Marked ("TheAlertTitle"));
- App.WaitForElement (c => c.Marked ("TheAlertMessage"));
- App.WaitForElement (c => c.Marked ("TheAcceptButton"));
- App.WaitForElement (c => c.Marked ("TheCancelButton"));
- App.Tap (c => c.Marked ("TheCancelButton"));
- App.Screenshot ("Display Alert Closed");
- App.WaitForNoElement (c => c.Marked ("TheAlertTitle"));
- }
-
- [Test]
- public void TestOkAndCancelResults ()
- {
- App.Tap (c => c.Marked ("Alert Override2"));
- App.Screenshot ("Display Alert");
- App.WaitForElement (c => c.Marked ("TheCancelButton"));
- App.Tap (c => c.Marked ("TheCancelButton"));
- App.Screenshot ("Display Alert Closed with cancel");
- App.WaitForElement (c => c.Marked ("Result: False"));
- App.Tap (c => c.Marked ("test2"));
- App.Screenshot ("Display Alert");
- App.WaitForElement (c => c.Marked ("TheAcceptButton"));
- App.Tap (c => c.Marked ("TheAcceptButton"));
- App.Screenshot ("Display Alert Closed with True");
- App.WaitForElement (c => c.Marked ("Result: True"));
- }
- }
-}
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/EditorUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/EditorUITests.cs
deleted file mode 100644
index e407ad23..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/EditorUITests.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-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(UITestCategories.Editor)]
- internal class EditorUITests : _ViewUITests
- {
- public EditorUITests ()
- {
- PlatformViewType = Views.Editor;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.EditorGallery);
- }
-
- // View Tests
- // 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
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
deleted file mode 100644
index 82ee605b..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/EntryUITests.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-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(UITestCategories.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");
-
- 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
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/FrameUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/FrameUITests.cs
deleted file mode 100644
index 338d6fed..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/FrameUITests.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-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
-{
-#if __MACOS__
- [Ignore("Not tested on the MAC")]
-#endif
- [TestFixture]
- [Category(UITestCategories.Frame)]
- internal class FrameUITests : _ViewUITests
- {
- public FrameUITests ()
- {
- PlatformViewType = Views.Frame;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.FrameGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ImageUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ImageUITests.cs
deleted file mode 100644
index cdf9af61..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ImageUITests.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-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(UITestCategories.Image)]
- internal class ImageUITests : _ViewUITests
- {
- public ImageUITests ()
- {
- PlatformViewType = Views.Image;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.ImageGallery);
-
- // let remote images load
- Thread.Sleep (2000);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- // TODO
- // Tests for remote images
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/LabelUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/LabelUITests.cs
deleted file mode 100644
index 2a011878..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/LabelUITests.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-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(UITestCategories.Label)]
- internal class LabelUITests : _ViewUITests
- {
- public LabelUITests ()
- {
- PlatformViewType = Views.Label;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.LabelGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ProgressBarUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ProgressBarUITests.cs
deleted file mode 100644
index aa0b7136..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ProgressBarUITests.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-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(UITestCategories.ProgressBar)]
- internal class ProgressBarUITests : _ViewUITests
- {
- public ProgressBarUITests ()
- {
- PlatformViewType = Views.ProgressBar;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.ProgressBarGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsEnabled () {}
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/RootGalleryUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/RootGalleryUITests.cs
deleted file mode 100644
index 1089b337..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/RootGalleryUITests.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using NUnit.Framework;
-using Xamarin.UITest;
-
-using System;
-using System.Threading;
-using System.Collections.Generic;
-using System.Linq;
-using Xamarin.UITest.Queries;
-using Xamarin.UITest.iOS;
-
-namespace Xamarin.Forms.Core.UITests
-{
- internal sealed class RootPageModel
- {
- public string ButtonId { get; private set; }
- public string PageId { get; private set; }
- public bool IsModal { get; private set; }
-
- public RootPageModel (string buttonId, string pageID, bool isModal = false)
- {
- ButtonId = buttonId;
- PageId = pageID;
- IsModal = isModal;
- }
- }
-
- [TestFixture]
- [Category(UITestCategories.RootGallery)]
- internal class RootGalleryUITests : BaseTestFixture
- {
- IEnumerable<RootPageModel> rootPages;
-
- public RootGalleryUITests ()
- {
- string[] ids = {
- "Content",
- "Nav->Content",
- "MDP->Nav->Content",
- "Tab->Content",
- "Tab->MDP->Nav->Content",
- "Tab->Nav->Content",
- "Tab(Many)->Nav->Content",
- "Nav->Tab->Content(BAD IDEA)",
- "Nav->Tab(Many)->Content(BAD IDEA)",
- "MDP->Nav->Tab->Content(BAD IDEA)"
- };
- string[] modalIds = {
- "(Modal)Content",
- "(Modal)Nav->Content",
- "(Modal)MDP->Nav->Content",
- "(Modal)Tab->Content",
- "(Modal)Tab->MDP->Nav->Content",
- "(Modal)Tab->Nav->Content",
- "(Modal)Tab(Many)->Nav->Content",
- "(Modal)Nav->Tab->Content(BAD IDEA)",
- "(Modal)Nav->Tab(Many)->Content(BAD IDEA)",
- "(Modal)MDP->Nav->Tab->Content(BAD IDEA)",
- };
-
- rootPages =
- (from id in ids
- select new RootPageModel (id + "ButtonId", id + "PageId")).Union (
- from id in modalIds
- select new RootPageModel (id + "ButtonId", id + "PageId",true));
-
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.RootPagesGallery);
- }
-
- [Test]
- [Ignore("Ignore while we dont't have a response from XTC team why this fails some times")]
- public void VisitEachPage ()
- {
- foreach (var page in rootPages) {
- var scrollViewArea = App.Query (q => q.Marked ("ChoosePageScrollView")).First ().Rect;
- App.ScrollForElement (string.Format("* marked:'{0}'", page.ButtonId), new Drag (scrollViewArea, Drag.Direction.BottomToTop, Drag.DragLength.Long));
- App.Tap (q => q.Marked (page.ButtonId));
-
- var ios = false;
-#if __IOS__
- ios = true;
-#endif
-
- if (!page.IsModal || ios)
- App.WaitForElement (q => q.Marked (page.PageId));
-
- App.Screenshot ("Page: " + page.PageId);
- }
- }
- }
-}
-
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/SliderUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/SliderUITests.cs
deleted file mode 100644
index c726903b..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/SliderUITests.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-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(UITestCategories.Slider)]
- internal class SliderUITests : _ViewUITests
- {
- public SliderUITests ()
- {
- PlatformViewType = Views.Slider;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.SliderGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/StepperUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/StepperUITests.cs
deleted file mode 100644
index 3afd1e6e..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/StepperUITests.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-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(UITestCategories.Stepper)]
- internal class StepperUITests : _ViewUITests
- {
- public StepperUITests ()
- {
- PlatformViewType = Views.Stepper;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.StepperGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/SwitchUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/SwitchUITests.cs
deleted file mode 100644
index d7896d4a..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/SwitchUITests.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-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(UITestCategories.Switch)]
- internal class SwitchUITests : _ViewUITests
- {
- public SwitchUITests ()
- {
- PlatformViewType = Views.Switch;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.SwitchGallery);
- }
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _IsFocused () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/TimePickerUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/TimePickerUITests.cs
deleted file mode 100644
index 954e8247..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/TimePickerUITests.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-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(UITestCategories.TimePicker)]
- internal class TimePickerUITests : _ViewUITests
- {
- public TimePickerUITests ()
- {
- PlatformViewType = Views.TimePicker;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.TimePickerGallery);
-
- Thread.Sleep (4000);
- }
-
- // 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
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ No newline at end of file
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/WebViewUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/WebViewUITests.cs
deleted file mode 100644
index e056b325..00000000
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/WebViewUITests.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-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(UITestCategories.WebView)]
- internal class WebViewUITests : _ViewUITests
- {
- public WebViewUITests ()
- {
- PlatformViewType = Views.WebView;
- }
-
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.WebViewGallery);
- }
-
- [Category(UITestCategories.ManualReview)]
- public override void _IsEnabled ()
- {
- Assert.Inconclusive ("Does not make sense for WebView");
- }
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _IsVisible () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction with Label")]
- public override void _Focus () {}
-
- // TODO
- public override void _GestureRecognizers () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction with Label")]
- public override void _IsFocused () {}
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _Opacity () {}
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _Rotation () {}
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _RotationX () {}
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _RotationY () {}
-
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _TranslationX () {}
-
- [Test]
- [Category(UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _TranslationY () {}
-
- [Test]
- [Category (UITestCategories.ManualReview)]
- [Ignore("Keep empty test from failing in Test Cloud")]
- public override void _Scale () {}
-
- [UiTestExempt (ExemptReason.CannotTest, "Invalid interaction with Label")]
- public override void _UnFocus () {}
-
- // TODO
- // Implement control specific ui tests
-
- protected override void FixtureTeardown ()
- {
- App.NavigateBack ();
- base.FixtureTeardown ();
- }
- }
-} \ 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 83a6d756..02b39371 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
@@ -64,53 +64,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="BaseTestFixture.cs" />
- <Compile Include="UITestCategories.cs" />
- <Compile Include="PlatformQueries.cs" />
- <Compile Include="Remotes\BaseViewContainerRemote.cs" />
- <Compile Include="Remotes\EventViewContainerRemote.cs" />
- <Compile Include="Remotes\LayeredViewContainerRemote.cs" />
- <Compile Include="Remotes\ViewContainerRemote.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Queries.cs" />
- <Compile Include="Remotes\StateViewContainerRemote.cs" />
- <Compile Include="Remotes\RemoteFactory.cs" />
- <Compile Include="Tests\ContextActionsUITests.cs" />
- <Compile Include="Tests\ActivityIndicatorUITests.cs" />
- <Compile Include="Tests\Legacy-CellsUITests.cs" />
- <Compile Include="Tests\DatePickerUITests.cs" />
- <Compile Include="Tests\BoxViewUITests.cs" />
- <Compile Include="Tests\EditorUITests.cs" />
- <Compile Include="Tests\FrameUITests.cs" />
- <Compile Include="Tests\ImageUITests.cs" />
- <Compile Include="Tests\WebViewUITests.cs" />
- <Compile Include="Tests\TimePickerUITests.cs" />
- <Compile Include="Tests\SwitchUITests.cs" />
- <Compile Include="Tests\StepperUITests.cs" />
- <Compile Include="Tests\SliderUITests.cs" />
- <Compile Include="Tests\SearchBarUITests.cs" />
- <Compile Include="Tests\ProgressBarUITests.cs" />
- <Compile Include="Tests\PickerUITests.cs" />
- <Compile Include="Tests\LabelUITests.cs" />
- <Compile Include="Tests\EntryUITests.cs" />
- <Compile Include="Tests\ButtonUITests.cs" />
- <Compile Include="Tests\ViewUITests.cs" />
- <Compile Include="Utilities\AppExtensions.cs" />
- <Compile Include="Utilities\Drag.cs" />
- <Compile Include="Utilities\Gestures.cs" />
- <Compile Include="Utilities\Logger.cs" />
- <Compile Include="Utilities\NumericExtensions.cs" />
- <Compile Include="Utilities\ParsingUtils.cs" />
- <Compile Include="Utilities\UITestCustomExceptions.cs" />
- <Compile Include="Utilities\ViewInspector.cs" />
- <Compile Include="Tests\DisplayAlertUITests.cs" />
- <Compile Include="Tests\ActionSheetUITests.cs" />
- <Compile Include="Tests\ToolbarItemTests.cs" />
- <Compile Include="Tests\RootGalleryUITests.cs" />
- <Compile Include="Tests\ScrollViewUITests.cs" />
- <Compile Include="Tests\Legacy-UnevenListTests.cs" />
- <Compile Include="Tests\AppearingUITests.cs" />
- <Compile Include="Tests\AutomationIDUITests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
@@ -137,6 +91,7 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" />
+ <Import Project="..\Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
diff --git a/Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj b/Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj
index 58e443d0..d18ed0a9 100644
--- a/Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj
+++ b/Xamarin.Forms.Core.macOS.UITests/Xamarin.Forms.Core.macOS.UITests.csproj
@@ -68,142 +68,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActionSheetUITests.cs">
- <Link>Tests\ActionSheetUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\BaseTestFixture.cs">
- <Link>BaseTestFixture.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\UITestCategories.cs">
- <Link>UITestCategories.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Queries.cs">
- <Link>Queries.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\AppExtensions.cs">
- <Link>Utilities\AppExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\PlatformQueries.cs">
- <Link>PlatformQueries.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Drag.cs">
- <Link>Utilities\Drag.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Gestures.cs">
- <Link>Utilities\Gestures.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\UITestCustomExceptions.cs">
- <Link>Utilities\UITestCustomExceptions.cs</Link>
- </Compile>
<Compile Include="MacOSApp.cs" />
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActivityIndicatorUITests.cs">
- <Link>Tests\ActivityIndicatorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ViewUITests.cs">
- <Link>Tests\ViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\BaseViewContainerRemote.cs">
- <Link>Remotes\BaseViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\EventViewContainerRemote.cs">
- <Link>Remotes\EventViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\LayeredViewContainerRemote.cs">
- <Link>Remotes\LayeredViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\StateViewContainerRemote.cs">
- <Link>Remotes\StateViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\ViewContainerRemote.cs">
- <Link>Remotes\ViewContainerRemote.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ViewInspector.cs">
- <Link>Utilities\ViewInspector.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Logger.cs">
- <Link>Utilities\Logger.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\NumericExtensions.cs">
- <Link>Utilities\NumericExtensions.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ParsingUtils.cs">
- <Link>Utilities\ParsingUtils.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AppearingUITests.cs">
- <Link>Tests\AppearingUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AutomationIDUITests.cs">
- <Link>Tests\AutomationIDUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\BoxViewUITests.cs">
- <Link>Tests\BoxViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ButtonUITests.cs">
- <Link>Tests\ButtonUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ContextActionsUITests.cs">
- <Link>Tests\ContextActionsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DatePickerUITests.cs">
- <Link>Tests\DatePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DisplayAlertUITests.cs">
- <Link>Tests\DisplayAlertUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EditorUITests.cs">
- <Link>Tests\EditorUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EntryUITests.cs">
- <Link>Tests\EntryUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\FrameUITests.cs">
- <Link>Tests\FrameUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ImageUITests.cs">
- <Link>Tests\ImageUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\LabelUITests.cs">
- <Link>Tests\LabelUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-CellsUITests.cs">
- <Link>Tests\Legacy-CellsUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-UnevenListTests.cs">
- <Link>Tests\Legacy-UnevenListTests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\PickerUITests.cs">
- <Link>Tests\PickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ProgressBarUITests.cs">
- <Link>Tests\ProgressBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\RootGalleryUITests.cs">
- <Link>Tests\RootGalleryUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ScrollViewUITests.cs">
- <Link>Tests\ScrollViewUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SearchBarUITests.cs">
- <Link>Tests\SearchBarUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SliderUITests.cs">
- <Link>Tests\SliderUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\StepperUITests.cs">
- <Link>Tests\StepperUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SwitchUITests.cs">
- <Link>Tests\SwitchUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\TimePickerUITests.cs">
- <Link>Tests\TimePickerUITests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ToolbarItemTests.cs">
- <Link>Tests\ToolbarItemTests.cs</Link>
- </Compile>
- <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\WebViewUITests.cs">
- <Link>Tests\WebViewUITests.cs</Link>
- </Compile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
@@ -227,6 +92,7 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" Condition="Exists('..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems')" />
+ <Import Project="..\Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems" Label="Shared" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Xamarin.UITest.Desktop.0.0.7\build\Xamarin.UITest.Desktop.targets" Condition="Exists('..\packages\Xamarin.UITest.Desktop.0.0.7\build\Xamarin.UITest.Desktop.targets')" />
</Project> \ No newline at end of file
diff --git a/Xamarin.Forms.sln b/Xamarin.Forms.sln
index ae8ef5e0..144d4b83 100644
--- a/Xamarin.Forms.sln
+++ b/Xamarin.Forms.sln
@@ -151,15 +151,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.Maps.MacOS",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.Core.macOS.UITests", "Xamarin.Forms.Core.macOS.UITests\Xamarin.Forms.Core.macOS.UITests.csproj", "{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}"
EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Xamarin.Forms.Core.UITests.Shared", "Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.Shared.shproj", "{E175485B-3C8C-47D7-8DD5-F7FED627EB25}"
+EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{0a39a74b-6f7a-4d41-84f2-b0ccdce899df}*SharedItemsImports = 4
+ Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems*{0a39a74b-6f7a-4d41-84f2-b0ccdce899df}*SharedItemsImports = 4
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{0f0db9cc-ea65-429c-9363-38624bf8f49c}*SharedItemsImports = 13
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{9db0cabb-24cc-4538-88ec-6e0a0fe40248}*SharedItemsImports = 4
+ Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems*{9db0cabb-24cc-4538-88ec-6e0a0fe40248}*SharedItemsImports = 4
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{a34ebe01-25bf-4e69-a2dc-2288dc625541}*SharedItemsImports = 4
+ Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems*{a34ebe01-25bf-4e69-a2dc-2288dc625541}*SharedItemsImports = 4
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{cb9c96ce-125c-4a68-b6a1-c3ff1fbf93e1}*SharedItemsImports = 4
docs\APIDocs.projitems*{dc1f3933-ac99-4887-8b09-e13c2b346d4f}*SharedItemsImports = 13
+ Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems*{e175485b-3c8c-47d7-8dd5-f7fed627eb25}*SharedItemsImports = 13
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{eadd8100-b3ae-4a31-92c4-267a64a1c6eb}*SharedItemsImports = 4
+ Xamarin.Forms.Core.UITests.Shared\Xamarin.Forms.Core.UITests.projitems*{eadd8100-b3ae-4a31-92c4-267a64a1c6eb}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1676,5 +1683,6 @@ Global
{8D3DFCB7-DB10-40E5-ACFE-411AAA85520D} = {4F5E2D21-17F6-4A42-B8FB-D03D82E24EC8}
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884} = {132FB9A4-613F-44CE-95D5-758D32D231DD}
{9DB0CABB-24CC-4538-88EC-6E0A0FE40248} = {D4D57221-71D6-4031-A6F4-EC66AF0929D9}
+ {E175485B-3C8C-47D7-8DD5-F7FED627EB25} = {D4D57221-71D6-4031-A6F4-EC66AF0929D9}
EndGlobalSection
EndGlobal