Exemplo n.º 1
0
        public void Issue2680Test_ScrollDisabled()
        {
            RunningApp.ScrollDown(ScrollViewMark);
            RunningApp.ScrollDown(ScrollViewMark);

            RunningApp.WaitForElement(FirstItemMark, timeout: TimeSpan.FromSeconds(5));
        }
Exemplo n.º 2
0
 public void ScrollViewInitiallyNotEnabled()
 {
     RunningApp.WaitForElement(InitiallyNotEnabled);
     RunningApp.Tap(InitiallyNotEnabled);
     RunningApp.WaitForElement(FirstItem);
     RunningApp.WaitForElement(ScrollView);
     RunningApp.ScrollDown(ScrollView, ScrollStrategy.Gesture);
     RunningApp.WaitForNoElement(Success);             // Shouldn't have scrolled, so no success label should be displayed
 }
Exemplo n.º 3
0
 public void ScrollViewInitiallyEnabled()
 {
     RunningApp.WaitForElement(InitiallyEnabled);
     RunningApp.Tap(InitiallyEnabled);
     RunningApp.WaitForElement(FirstItem);
     RunningApp.WaitForElement(ScrollView);
     RunningApp.ScrollDown(ScrollView, ScrollStrategy.Gesture);
     RunningApp.WaitForElement(Success);             // If the ScrollView scrolled, the success label should be displayed
 }
Exemplo n.º 4
0
        public void Issue2680Test_ScrollEnabled()
        {
            RunningApp.Tap(q => q.Button(ToggleButtonMark));

            RunningApp.ScrollDown(ScrollViewMark);
            RunningApp.ScrollDown(ScrollViewMark);

            RunningApp.WaitForNoElement(FirstItemMark, timeout: TimeSpan.FromSeconds(5));
        }
Exemplo n.º 5
0
        public void FlyoutHeaderBehaviorCollapseOnScroll()
        {
            RunningApp.Tap(nameof(FlyoutHeaderBehavior.CollapseOnScroll));
            this.ShowFlyout();
            float startingHeight = GetFlyoutHeight();

            RunningApp.ScrollDown("Item 4", ScrollStrategy.Gesture);
            float endHeight = GetFlyoutHeight();

            Assert.Greater(startingHeight, endHeight);
        }
Exemplo n.º 6
0
        public void FlyoutHeaderBehaviorFixed()
        {
            RunningApp.Tap(nameof(FlyoutHeaderBehavior.Fixed));
            this.ShowFlyout();
            float startingHeight = GetFlyoutHeight();

            RunningApp.ScrollDown("Item 4", ScrollStrategy.Gesture);
            float endHeight = GetFlyoutHeight();

            Assert.AreEqual(startingHeight, endHeight);
        }
Exemplo n.º 7
0
        public void ScrollViewInitiallyNotEnabledThenEnabled()
        {
            RunningApp.WaitForElement(InitiallyNotEnabled);
            RunningApp.Tap(InitiallyNotEnabled);
            RunningApp.WaitForElement(ToggleButton);
            RunningApp.Tap(ToggleButton);

            // Scrolling should now be IsEnabled = true

            RunningApp.WaitForElement(FirstItem);
            RunningApp.WaitForElement(ScrollView);
            RunningApp.ScrollDown(ScrollView, ScrollStrategy.Gesture);
            RunningApp.WaitForElement(Success);             // If the ScrollView scrolled, the success label should be displayed
        }
Exemplo n.º 8
0
        public void ScrollViewInitiallyEnabledThenDisabled()
        {
            RunningApp.WaitForElement(InitiallyEnabled);
            RunningApp.Tap(InitiallyEnabled);
            RunningApp.WaitForElement(ToggleButton);
            RunningApp.Tap(ToggleButton);

            // Scrolling should now be IsEnabled = false

            RunningApp.WaitForElement(FirstItem);
            RunningApp.WaitForElement(ScrollView);
            RunningApp.ScrollDown(ScrollView, ScrollStrategy.Gesture);
            RunningApp.WaitForNoElement(Success);             // Shouldn't have scrolled, so no success label should be displayed
        }
        public void TableViewEntryCellShowsDefaultKeyboardThenNumericKeyboardAfterScrolling()
        {
            RunningApp.ScrollDown();
            RunningApp.ScrollDown();
            RunningApp.Tap(x => x.Marked("0"));
            var e = RunningApp.Query(c => c.Marked("0").Parent("UITextField").Index(0).Invoke("keyboardType")) [0];

            //8 DecimalPad
            Assert.AreEqual(8, e);
            RunningApp.DismissKeyboard();
            RunningApp.Tap(x => x.Marked("Enter text here").Index(0).Parent());
            RunningApp.ScrollUp();
            RunningApp.Tap(x => x.Marked("Enter text here 1"));
            RunningApp.Tap(x => x.Marked("Enter text here 2").Index(0).Parent());
            var e1 = RunningApp.Query(c => c.Marked("Enter text here 2").Parent("UITextField").Index(0).Invoke("keyboardType")) [0];

            Assert.AreEqual(0, e1);
        }
Exemplo n.º 10
0
        public void Bugzilla33578Test()
        {
            RunningApp.ScrollDown();
            RunningApp.ScrollDown();
            RunningApp.Tap(x => x.Marked("0"));
            var e = RunningApp.Query(c => c.Marked("0").Parent("UITextField").Index(0).Invoke("keyboardType")) [0];

            //8 DecimalPad
            Assert.AreEqual(8, e);
            RunningApp.DismissKeyboard();
            RunningApp.Tap(x => x.Marked("Enter text here").Index(0).Parent());
            RunningApp.ScrollUp();
            RunningApp.Tap(x => x.Marked("Enter text here 1"));
            RunningApp.Tap(x => x.Marked("Enter text here 2").Index(0).Parent());
            var e1 = RunningApp.Query(c => c.Marked("Enter text here 2").Parent("UITextField").Index(0).Invoke("keyboardType")) [0];

            Assert.AreEqual(0, e1);
        }
Exemplo n.º 11
0
		public void ChangeOrientationCheckScroll ()
		{
#if __ANDROID__
			var isAndroid = true;
#else
			var isAndroid = false;
#endif
			var grid1 = RunningApp.Query("MainGrid").Single();
			RunningApp.SetOrientationLandscape ();
			RunningApp.ScrollDown ();
			RunningApp.SetOrientationPortrait ();
			var grid2 = RunningApp.Query("MainGrid").Single();
			RunningApp.Screenshot ("Did it resize ok? Do you see some white on the bottom?");

			if (!isAndroid) {
				Assert.AreEqual (grid1.Rect.CenterY, grid2.Rect.CenterY);
			}
		}
Exemplo n.º 12
0
        public void FlyoutHeaderBehaviorScroll()
        {
            RunningApp.Tap(nameof(FlyoutHeaderBehavior.Scroll));
            this.ShowFlyout();

            var startingY = GetFlyoutY();

            RunningApp.ScrollDown("Item 5", ScrollStrategy.Gesture);
            var nextY = GetFlyoutY();

            while (nextY != null)
            {
                Assert.Greater(startingY.Value, nextY.Value);
                startingY = nextY;
                RunningApp.ScrollDown("Item 5", ScrollStrategy.Gesture);
                nextY = GetFlyoutY();
            }
        }
Exemplo n.º 13
0
        public void ChangeOrientationCheckScroll()
        {
            var isAndroid = RunningApp is AndroidApp;
            var className = "Xamarin_Forms_Platform_iOS_BoxRenderer";

            if (isAndroid)
            {
                className = "BoxRenderer";
            }
            var box1 = RunningApp.Query(c => c.Class(className)) [0];

            RunningApp.SetOrientationLandscape();
            RunningApp.ScrollDown();
            RunningApp.SetOrientationPortrait();
            var box2 = RunningApp.Query(c => c.Class(className)) [0];

            RunningApp.Screenshot("Did it resize ok? Do you see some white on the bottom?");
            if (!isAndroid)
            {
                Assert.AreEqual(box1.Rect.CenterY, box2.Rect.CenterY);
            }
        }
Exemplo n.º 14
0
 public void TestDoesntCrashWithCachingDisable()
 {
     RunningApp.ScrollDown();
     RunningApp.ScrollDown();
 }
Exemplo n.º 15
0
 public void Issue1Test()
 {
     RunningApp.WaitForElement(q => q.Marked("ListView"));
     RunningApp.ScrollDown("ListView");
     RunningApp.WaitForElement(q => q.Marked("ListView"));
 }
Exemplo n.º 16
0
		public void TestDoesntCrashWithCachingDisable()
		{
			RunningApp.WaitForElement("ImageLoaded");
			RunningApp.ScrollDown();
			RunningApp.ScrollDown();
		}