From b5d48d177d6e9734eee57216628a9f399b49c454 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Fri, 6 Dec 2024 15:06:00 +0100 Subject: [PATCH] chore: Improve test to validate actual translation --- .../Tests/Windows_UI_Xaml/Given_UIElement.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs index acc7cfe970fb..ff85aaadc424 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_UIElement.cs @@ -1568,6 +1568,9 @@ public async Task When_Element_Has_Translation_And_Visual_Has_Offset() [TestMethod] [RunsOnUIThread] +#if !__SKIA__ + [Ignore("Translation X and Y axis is currently supported on Skia only")] +#endif public async Task When_Translation_On_Load() { var sut = new Rectangle() @@ -1582,10 +1585,11 @@ public async Task When_Translation_On_Load() canvas.Children.Add(sut); TestServices.WindowHelper.WindowContent = canvas; await TestServices.WindowHelper.WaitForLoaded(sut); - sut.Translation += new Vector3(200, 0, 128); + sut.Translation += new Vector3(100, 100, 128); await TestServices.WindowHelper.WaitForIdle(); var bitmap = await UITestHelper.ScreenShot(canvas); - ImageAssert.DoesNotHaveColorAt(bitmap, new Windows.Foundation.Point(50, 50), Microsoft.UI.Colors.Blue, tolerance: 25); + ImageAssert.DoesNotHaveColorAt(bitmap, new Windows.Foundation.Point(50, 50), Microsoft.UI.Colors.Blue); + ImageAssert.HasColorAt(bitmap, new Windows.Foundation.Point(150, 150), Microsoft.UI.Colors.Blue); } #if HAS_UNO