diff options
author | kingces95 <kingces95@users.noreply.github.com> | 2016-04-06 23:03:59 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-04-06 23:03:59 -0700 |
commit | a0f0b3954ed73c891e52f10ab21243b8473da72a (patch) | |
tree | fa013ea8f1cdcfe58438dafac8510f41e36dc25a /Xamarin.Forms.Core.iOS.UITests | |
parent | e3191821bae99fb52d32644566cd14a8f496e36a (diff) | |
download | xamarin-forms-a0f0b3954ed73c891e52f10ab21243b8473da72a.tar.gz xamarin-forms-a0f0b3954ed73c891e52f10ab21243b8473da72a.tar.bz2 xamarin-forms-a0f0b3954ed73c891e52f10ab21243b8473da72a.zip |
Enable warnings as errors in tests
Diffstat (limited to 'Xamarin.Forms.Core.iOS.UITests')
6 files changed, 19 insertions, 7 deletions
diff --git a/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs b/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs index f51782ce..5b47297d 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs +++ b/Xamarin.Forms.Core.iOS.UITests/Remotes/BaseViewContainerRemote.cs @@ -19,7 +19,7 @@ namespace Xamarin.Forms.Core.UITests { internal abstract class BaseViewContainerRemote { - bool requiresDismissal; + //bool requiresDismissal; protected IApp App { get; private set; } @@ -57,7 +57,7 @@ namespace Xamarin.Forms.Core.UITests LayeredLabelQuery = string.Format ("* marked:'{0}LayeredLabel'", formsType); if (platformViewType == PlatformViews.DatePicker) { - requiresDismissal = true; + //requiresDismissal = true; } } diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs index ed75fa43..2266c26e 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs +++ b/Xamarin.Forms.Core.iOS.UITests/Tests/ScrollViewUITests.cs @@ -20,7 +20,7 @@ namespace Xamarin.Forms.Core.UITests [Description ("Scroll element to the start")] public void ScrollToElement1Start () { - var scroller = App.Query (c => c.Marked ("thescroller"))[0]; + //var scroller = App.Query (c => c.Marked ("thescroller"))[0]; //need to extract the contentOffset on iOS App.Tap(c=> c.Marked("Start")); App.WaitForElement (c => c.Marked ("the scrollto button")); diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs index ce846db9..522cd4b6 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs +++ b/Xamarin.Forms.Core.iOS.UITests/Tests/ToolbarItemTests.cs @@ -52,7 +52,7 @@ namespace Xamarin.Forms.Core.UITests { ShouldShowMenu (); if (App is AndroidApp) { - var btn = App.Query (c => c.Marked (btn4Id))[0]; + //App.Query (c => c.Marked (btn4Id))[0]; } else { App.Tap (c => c.Marked (btn4Id)); @@ -65,7 +65,7 @@ namespace Xamarin.Forms.Core.UITests ShouldHideMenu (); var btn1 = App.Query (c => c.Marked (btn1Id)) [0]; ShouldShowMenu (); - var btn2 = App.Query (c => c.Marked (btn4Id)) [0]; + //var btn2 = App.Query (c => c.Marked (btn4Id)) [0]; Assert.False (btn1.Enabled, "Toolbar Item should be disable"); //TODO: how to check Enable for the textview //Assert.False (btn2.Enabled, "Toolbar Item should be disable"); diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs index a11d1f66..9d6f08f6 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs +++ b/Xamarin.Forms.Core.iOS.UITests/Tests/ViewUITests.cs @@ -105,7 +105,7 @@ namespace Xamarin.Forms.Core.UITests [UiTest (typeof (VisualElement), "IsEnabled")] public virtual void _IsEnabled () { - var propName = Test.VisualElement.IsEnabled.ToString (); + //var propName = Test.VisualElement.IsEnabled.ToString (); var remote = new StateViewContainerRemote (App, Test.VisualElement.IsEnabled, PlatformViewType); remote.GoTo (); diff --git a/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs b/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs index 288ee3d6..c7eee049 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs +++ b/Xamarin.Forms.Core.iOS.UITests/Utilities/ViewInspector.cs @@ -66,7 +66,8 @@ namespace Xamarin.Forms.Core.UITests MaybeGetProperty<float> (app, query, property, out prop) || MaybeGetProperty<bool> (app, query, property, out prop); - //if (found) + if (found) + continue; // Logger.LogLine (string.Format ("{0,-30}: {1}", property, prop)); } @@ -139,6 +140,8 @@ namespace Xamarin.Forms.Core.UITests MaybeGetLayerProperty<int>(app, query, property, out prop) || MaybeGetLayerProperty<bool>(app, query, property, out prop); + if (found) + continue; //if (found) // Logger.LogLine(string.Format("{0,-30}: {1}", property, prop)); } @@ -304,6 +307,8 @@ namespace Xamarin.Forms.Core.UITests MaybeGetProperty<float> (app, query, property, out prop) || MaybeGetProperty<bool> (app, query, property, out prop); + if (found) + continue; //if (found) // Logger.LogLine (string.Format ("{0,-30}: {1}", property, prop)); } 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 2846ddc0..7b53147f 100644 --- a/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj +++ b/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj @@ -22,6 +22,8 @@ <DefineConstants>TRACE;DEBUG;__IOS__;UITEST</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <NoWarn>0114;0108;4014;1998;0649;0618;0169;0168;0219</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -30,6 +32,8 @@ <DefineConstants>TRACE;__IOS__;UITEST</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <NoWarn>0114;0108;4014;1998;0649;0618;0169;0168;0219</NoWarn> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'"> <DebugSymbols>true</DebugSymbols> @@ -39,6 +43,9 @@ <PlatformTarget>AnyCPU</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <NoWarn>0114;0108;4014;1998;0649;0618;0169;0168;0219</NoWarn> + <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> |