Exemplo n.º 1
0
        public void MasterViewSizeDoesntChangeAfterBackground()
        {
            var idiom = RunningApp.WaitForElement("Idiom");

            // This behavior is currently broken on a phone device Issue 7270
            if (idiom[0].ReadText() != "Tablet")
            {
                return;
            }

            RunningApp.SetOrientationLandscape();
            RunningApp.Tap("CloseMasterView");
            RunningApp.Tap("ShowLeftToRight");
            var windowSize = RunningApp.WaitForElement("MasterLayout")[0];

            RunningApp.SendAppToBackground(TimeSpan.FromSeconds(5));
            var newWindowSize = RunningApp.WaitForElement("MasterLayout")[0];

            Assert.AreEqual(newWindowSize.Rect.Width, windowSize.Rect.Width);
            Assert.AreEqual(newWindowSize.Rect.Height, windowSize.Rect.Height);
        }