summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-05-11 08:21:41 -0600
committerkingces95 <kingces95@users.noreply.github.com>2016-05-11 07:21:41 -0700
commit846c1dc0ecb70920f15f4884b69396cc52ba3e96 (patch)
tree5c99c116418e36ada4c72cdc8ee9cc0ac1fad9c1 /Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
parentad3a6f68f009555387847efc37b324187b24212a (diff)
downloadxamarin-forms-846c1dc0ecb70920f15f4884b69396cc52ba3e96.tar.gz
xamarin-forms-846c1dc0ecb70920f15f4884b69396cc52ba3e96.tar.bz2
xamarin-forms-846c1dc0ecb70920f15f4884b69396cc52ba3e96.zip
Make RunningApp.Screenshot do nothing unless SCREENSHOTS symbol defined (#169)
* Make RunningApp.Screenshot do nothing unless SCREENSHOTS symbol is defined * Replace IApp casts with conditional compilation directives * Fix warning * Remove EnableLocalScreenshots * Add Ignore attributes to keep tests from "failing" in Test Cloud
Diffstat (limited to 'Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs')
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs46
1 files changed, 23 insertions, 23 deletions
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
index 5ae8f506..47bb45cb 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
+++ b/Xamarin.Forms.Core.iOS.UITests/Tests/ButtonUITests.cs
@@ -64,11 +64,11 @@ namespace Xamarin.Forms.Core.UITests
var remote = new ViewContainerRemote (App, Test.Button.BorderRadius, PlatformViewType);
remote.GoTo ();
- if (App is iOSApp) {
- var borderRadius = remote.GetProperty<float> (Button.BorderRadiusProperty);
- Assert.AreEqual (20.0f, borderRadius);
- }
-
+#if __IOS__
+ var borderRadius = remote.GetProperty<float> (Button.BorderRadiusProperty);
+ Assert.AreEqual (20.0f, borderRadius);
+#endif
+
}
[Test]
@@ -79,10 +79,10 @@ namespace Xamarin.Forms.Core.UITests
var remote = new ViewContainerRemote (App, Test.Button.BorderWidth, PlatformViewType);
remote.GoTo ();
- if (App is iOSApp) {
- var borderWidth = remote.GetProperty<float> (Button.BorderWidthProperty);
+#if __IOS__
+ var borderWidth = remote.GetProperty<float> (Button.BorderWidthProperty);
Assert.AreEqual (15.0f, borderWidth);
- }
+#endif
}
@@ -124,14 +124,13 @@ namespace Xamarin.Forms.Core.UITests
var remote = new ViewContainerRemote (App, Test.Button.Font, PlatformViewType);
remote.GoTo ();
- if (App is AndroidApp) {
- var isBold = remote.GetProperty<bool> (Button.FontProperty);
- Assert.True (isBold);
- } else {
- var font = remote.GetProperty<Font> (Button.FontProperty);
- Assert.True (font.FontAttributes.HasFlag (FontAttributes.Bold));
- }
-
+#if __ANDROID__
+ var isBold = remote.GetProperty<bool> (Button.FontProperty);
+ Assert.True (isBold);
+#else
+ var font = remote.GetProperty<Font> (Button.FontProperty);
+ Assert.True (font.FontAttributes.HasFlag (FontAttributes.Bold));
+#endif
}
[Test]
@@ -155,19 +154,20 @@ namespace Xamarin.Forms.Core.UITests
Assert.AreEqual ("Text", buttonText);
}
+ //TODO iOS
+
+#if __ANDROID__
[Test]
[UiTest (typeof (Button), "TextColor")]
public void TextColor ()
{
- //TODO iOS
- if (App is AndroidApp) {
- var remote = new ViewContainerRemote (App, Test.Button.TextColor, PlatformViewType);
- remote.GoTo ();
+ var remote = new ViewContainerRemote (App, Test.Button.TextColor, PlatformViewType);
+ remote.GoTo ();
- var buttonTextColor = remote.GetProperty<Color> (Button.TextColorProperty);
- Assert.AreEqual (Color.Pink, buttonTextColor);
- }
+ var buttonTextColor = remote.GetProperty<Color> (Button.TextColorProperty);
+ Assert.AreEqual (Color.Pink, buttonTextColor);
}
+#endif
protected override void FixtureTeardown ()
{