diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-11-16 14:07:30 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-11-16 13:07:30 -0800 |
commit | 122f0e3e6060711d6c3b2b8523236b8a057434df (patch) | |
tree | 719b2a3f4a3146602e764ebeca3939b8788db1a8 /Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs | |
parent | acc6efb3d7d502d0a40020ec86eaff4d018de8be (diff) | |
download | xamarin-forms-122f0e3e6060711d6c3b2b8523236b8a057434df.tar.gz xamarin-forms-122f0e3e6060711d6c3b2b8523236b8a057434df.tar.bz2 xamarin-forms-122f0e3e6060711d6c3b2b8523236b8a057434df.zip |
Run multiple UI tests without restarting ControlGallery (#539)
* Allow UI tests to bypass "manual" navigation to isses pages
* Add missing Preserve attribute
* Make Issue198 test work with direct navigation
* Remove empty UI tests
* Fix error handling for iOS
* Use navigation which works for subsequent TestNavigationPages on iOS
* Fix race condition in 39530 test
Remove master page nesting when doing direct nav for UI tests
* Set up and run a single instance of Control Gallery for UI tests
* Force NavigateToIssue to wait for main page appearing to deal with iOS timing
* Move remaining UI tests into Issues namespace
* Change the connection check URL so it'll work on iOS
* Make Appearing Gallery tests work without restarting app
* Prevent ContextActions tests from stepping on each other
* Make context menu test more robust
* Move ButtonExtensions back to Controls namespace
* Have test 774 dismiss the action sheet before ending
* Update UITest package to 2.0.0 stable
* Make 2948 restore orientation when it's done
* Null check on PageController before calling SendDisappearing
* Adding a wait for the root page in the core tests
* Add consecutive tests reset to prevent memory slog on older iOS devices
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs b/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs index 71c5e0c6..4ea9b30f 100644 --- a/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs +++ b/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs @@ -9,6 +9,7 @@ using UIKit; using Xamarin.Forms; using Xamarin.Forms.ControlGallery.iOS; using Xamarin.Forms.Controls; +using Xamarin.Forms.Controls.Issues; using Xamarin.Forms.Platform.iOS; [assembly: Dependency(typeof(TestCloudService))] @@ -132,6 +133,7 @@ namespace Xamarin.Forms.ControlGallery.iOS [Register("AppDelegate")] public partial class AppDelegate : FormsApplicationDelegate { + App _app; public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { @@ -150,6 +152,7 @@ namespace Xamarin.Forms.ControlGallery.iOS }; var app = new App(); + _app = app; // When the native control gallery loads up, it'll let us know so we can add the nested native controls MessagingCenter.Subscribe<NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls); @@ -352,6 +355,21 @@ namespace Xamarin.Forms.ControlGallery.iOS } #endregion + + [Export("navigateToTest:")] + public string NavigateToTest(string test) + { + // According to https://developer.xamarin.com/guides/testcloud/uitest/working-with/backdoors/ + // this method has to return a string + return _app.NavigateToTestPage(test).ToString(); + } + + [Export("reset:")] + public string Reset(string str) + { + _app.Reset(); + return String.Empty; + } } [Register("KVOUISlider")] |