コード例 #1
0
ファイル: ImageButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void Image()
        {
            //TODO iOS
            var remote = new ViewContainerRemote(App, Test.ImageButton.Image, PlatformViewType);

            remote.GoTo();
        }
コード例 #2
0
        public override void _GestureRecognizers()
        {
            // TODO Can implement this
            var remote = new ViewContainerRemote(App, Test.View.GestureRecognizers, PlatformViewType);

            remote.GoTo();
        }
コード例 #3
0
ファイル: ImageButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void BorderColor()
        {
            //TODO iOS
            var remote = new ViewContainerRemote(App, Test.ImageButton.BorderColor, PlatformViewType);

            remote.GoTo();
        }
コード例 #4
0
ファイル: ViewUITests.cs プロジェクト: zmtzawqlp/maui
        public virtual void _TranslationY()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.TranslationY, PlatformViewType);

            remote.GoTo();
#if __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#endif
        }
コード例 #5
0
ファイル: ButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void TextColor()
        {
            var remote = new ViewContainerRemote(App, Test.Button.TextColor, PlatformViewType);

            remote.GoTo();

            var buttonTextColor = remote.GetProperty <Color> (Button.TextColorProperty);

            Assert.AreEqual(Color.Pink, buttonTextColor);
        }
コード例 #6
0
ファイル: ButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void Text()
        {
            var remote = new ViewContainerRemote(App, Test.Button.Text, PlatformViewType);

            remote.GoTo();

            var buttonText = remote.GetProperty <string>(Button.TextProperty);

            Assert.AreEqual("Text", buttonText);
        }
コード例 #7
0
ファイル: ImageButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void BorderWidth()
        {
            var remote = new ViewContainerRemote(App, Test.ImageButton.BorderWidth, PlatformViewType);

            remote.GoTo();

#if __IOS__
            var borderWidth = remote.GetProperty <float>(ImageButton.BorderWidthProperty);
            Assert.AreEqual(15.0f, borderWidth);
#endif
        }
コード例 #8
0
ファイル: ImageButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void CornerRadius()
        {
            var remote = new ViewContainerRemote(App, Test.ImageButton.CornerRadius, PlatformViewType);

            remote.GoTo();

#if __IOS__
            var cornerRadius = remote.GetProperty <float>(ImageButton.CornerRadiusProperty);
            Assert.AreEqual(20.0f, cornerRadius);
#endif
        }
コード例 #9
0
ファイル: ImageButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void Command()
        {
            var remote = new ViewContainerRemote(App, Test.ImageButton.Command, PlatformViewType);

            remote.GoTo();

            remote.TapView();

            App.WaitForElement(q => q.Marked("Hello Command"));
            App.Tap(q => q.Marked("Destroy"));
        }
コード例 #10
0
        public void IsRunning()
        {
            var remote = new ViewContainerRemote(App, Test.ActivityIndicator.IsRunning, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("Not tested yet");
#elif __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#else
            var isRunning = remote.GetProperty <bool> (ActivityIndicator.IsRunningProperty);
            Assert.IsTrue(isRunning);
#endif
        }
コード例 #11
0
ファイル: ViewUITests.cs プロジェクト: zmtzawqlp/maui
        public virtual void _Opacity()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.Opacity, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("needs testing");
#elif __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#else
            float opacity = -1f;
            opacity = remote.GetProperty <float>(View.OpacityProperty);
            Assert.AreEqual(0.5f, opacity);
#endif
        }
コード例 #12
0
ファイル: ViewUITests.cs プロジェクト: zmtzawqlp/maui
        public virtual void _Scale()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.Scale, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("needs testing");
#else
#if __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#endif
            var    scaleMatrix     = remote.GetProperty <Matrix>(View.ScaleProperty);
            Matrix generatedMatrix = NumericExtensions.BuildScaleMatrix(0.5f);
            Assert.AreEqual(generatedMatrix, scaleMatrix);
#endif
        }
コード例 #13
0
ファイル: ButtonUITests.cs プロジェクト: zmtzawqlp/maui
        public void Font()
        {
            //TODO iOS
            var remote = new ViewContainerRemote(App, Test.Button.Font, PlatformViewType);

            remote.GoTo();

#if __ANDROID__
            var isBold = remote.GetProperty <bool> (Button.FontProperty);
            Assert.True(isBold);
#elif __MACOS__
            Assert.Inconclusive("needs testing");
#else
            var font = remote.GetProperty <Font>(Button.FontProperty);
            Assert.True(font.FontAttributes.HasFlag(FontAttributes.Bold));
#endif
        }
コード例 #14
0
ファイル: ViewUITests.cs プロジェクト: zmtzawqlp/maui
        public virtual void _RotationY()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.RotationY, PlatformViewType);

            remote.GoTo();

#if __ANDROID__
            var rotationY = remote.GetProperty <float>(View.RotationYProperty);
            Assert.AreEqual(10.0f, rotationY);
#endif
#if __IOS__
            var    rotationYMatrix = remote.GetProperty <Matrix> (View.RotationYProperty);
            Matrix matrix          = NumericExtensions.CalculateRotationMatrixForDegrees(10.0f, Axis.Y);
            Assert.AreEqual(matrix, rotationYMatrix);
#endif
#if __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#endif
        }