Esempio n. 1
0
        public void Check_Bound_Color()
        {
            Run("UITests.Shared.Windows_UI_Xaml_Shapes.Rectangle_Color_Bound");

            _app.WaitForText("StatusTextBlock", "Is bound");

            var screenshot = TakeScreenshot("Complete");

            var bounds = _app.GetRect("TargetRectangle");

            ImageAssert.AssertHasColorAt(screenshot, bounds.CenterX, bounds.CenterY, Color.Blue);
        }
Esempio n. 2
0
        [ActivePlatforms(Platform.Android, Platform.iOS)]         // Canvas.ZIndex isn't implemented for WASM yet
        public void Verify_Canvas_ZIndex()
        {
            Run("UITests.Shared.Windows_UI_Xaml_Controls.Canvas.Canvas_ZIndex");

            var screenshot = TakeScreenshot("Rendered");

            var redBorderRect = _app.GetRect("CanvasBorderRed");

            ImageAssert.AssertHasColorAt(screenshot, redBorderRect.CenterX, redBorderRect.CenterY, Color.Green /*psych*/);

            var greenBorderRect = _app.GetRect("CanvasBorderGreen");

            ImageAssert.AssertHasColorAt(screenshot, greenBorderRect.CenterX, greenBorderRect.CenterY, Color.Blue);
        }
Esempio n. 3
0
        public void Verify_Canvas_With_Outer_Clip()
        {
            Run("UITests.Shared.Windows_UI_Xaml_Controls.Canvas.Canvas_With_Outer_Clip");

            var screenshot = TakeScreenshot("Rendered");

            var clippedLocation = _app.GetRect("LocatorBorder1");

            ImageAssert.AssertHasColorAt(screenshot, clippedLocation.CenterX, clippedLocation.CenterY, Color.Red);

            var unclippedLocation = _app.GetRect("LocatorBorder2");

            ImageAssert.AssertHasColorAt(screenshot, unclippedLocation.CenterX, unclippedLocation.CenterY, Color.Blue);
        }