summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.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.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.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.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs
index 7a01f520..4e1069f0 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs
@@ -79,10 +79,7 @@ namespace Xamarin.Forms.Controls
RunningApp.Tap (q => q.Marked ("Toggle"));
RunningApp.Screenshot ("Portrait Visible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
- if (RunningApp is iOSApp)
- RunningApp.Tap (q => q.Marked ("Toggle"));
- else
- RunningApp.Back ();
+ Back();
RunningApp.Screenshot ("Portrait Invisible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
RunningApp.SetOrientationLandscape ();
@@ -91,24 +88,27 @@ namespace Xamarin.Forms.Controls
RunningApp.Tap (q => q.Marked ("Toggle"));
RunningApp.Screenshot ("Landscape Visible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
- if (RunningApp is iOSApp)
- RunningApp.Tap (q => q.Marked ("Toggle"));
- else
- RunningApp.Back ();
+ Back();
RunningApp.Screenshot ("Landscape InVisible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
RunningApp.SetOrientationPortrait ();
RunningApp.Tap (q => q.Marked ("Toggle"));
RunningApp.Screenshot ("Portrait Visible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
- if (RunningApp is iOSApp)
- RunningApp.Tap (q => q.Marked ("Toggle"));
- else
- RunningApp.Back ();
+ Back();
RunningApp.Screenshot ("Portrait Invisible");
RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
RunningApp.SetOrientationLandscape ();
}
+
+ void Back()
+ {
+#if __IOS__
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+#else
+ RunningApp.Back();
+#endif
+ }
#endif
}
}