diff --git a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Windowing/Given_AppWindow.cs b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Windowing/Given_AppWindow.cs index 29d93636f3d3..8c09a161e7a1 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Windowing/Given_AppWindow.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Windowing/Given_AppWindow.cs @@ -11,9 +11,11 @@ namespace Uno.UI.RuntimeTests.Tests.Microsoft_UI_Windowing; [TestClass] [RunsOnUIThread] +#if !__SKIA__ && !WINDOWS +[Ignore] +#endif public class Given_AppWindow { -#if __SKIA__ || WINDOWS [TestMethod] public async Task When_Resize() { @@ -173,6 +175,5 @@ private bool IsGtk() return false; } -#endif } #endif diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.Android.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.Android.cs index 84c0e39cdfe1..22129bd8cf07 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.Android.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.Android.cs @@ -8,6 +8,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_FileIO_Native : Given_FileIO_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.iOS.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.iOS.cs index 3fa70487ed6e..9dc635992187 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.iOS.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_FileIO_Native.iOS.cs @@ -7,6 +7,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_FileIO_Native : Given_FileIO_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.Android.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.Android.cs index 9d9749364db1..5dcac8de5f06 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.Android.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.Android.cs @@ -8,6 +8,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_StorageFile_Native : Given_StorageFile_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.iOS.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.iOS.cs index f58af659eb8f..41457d6265bd 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.iOS.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile_Native.iOS.cs @@ -7,6 +7,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_StorageFile_Native : Given_StorageFile_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.Android.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.Android.cs index c0a67a1ade14..5b256562ca3c 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.Android.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.Android.cs @@ -9,6 +9,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_StorageFolder_Native : Given_StorageFolder_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.iOS.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.iOS.cs index 211ebaf8e14e..3c01d9304508 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.iOS.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFolder_Native.iOS.cs @@ -7,6 +7,7 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_Storage { +#pragma warning disable MSTEST0016 // Test class should have at least one test method - https://github.com/microsoft/testfx/issues/4543 [TestClass] public class Given_StorageFolder_Native : Given_StorageFolder_Native_Base { diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_CompositionVisualSurface.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_CompositionVisualSurface.cs index f170b29d3aa0..06363860a501 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_CompositionVisualSurface.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_CompositionVisualSurface.cs @@ -11,13 +11,16 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Hosting; using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Imaging; namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Composition; [TestClass] public class Given_CompositionVisualSurface { -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [TestMethod] [RunsOnUIThread] public async Task When_SourceVisual_Changes() @@ -28,7 +31,7 @@ public async Task When_SourceVisual_Changes() Width = 200, Height = 200, Stretch = Stretch.UniformToFill, - Source = ImageSource.TryCreateUriFromString("https://uno-assets.platform.uno/logos/uno.png") + Source = new BitmapImage(ImageSource.TryCreateUriFromString("https://uno-assets.platform.uno/logos/uno.png")) }; var sut = new ContentControl { @@ -68,5 +71,4 @@ await UITestHelper.Load(new Grid return (await UITestHelper.ScreenShot(expected), await UITestHelper.ScreenShot(sut)); } -#endif } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ContainerVisual.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ContainerVisual.cs index fe4470b2dcad..e1f18e9f71ba 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ContainerVisual.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ContainerVisual.cs @@ -9,10 +9,10 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Composition; +#if __SKIA__ [TestClass] public class Given_ContainerVisual { -#if __SKIA__ [TestMethod] [RunsOnUIThread] public void When_Children_Change() @@ -40,5 +40,5 @@ public void When_Children_Change() Assert.IsFalse(containerVisual.IsChildrenRenderOrderDirty); Assert.AreEqual(1, children.Count()); } -#endif } +#endif \ No newline at end of file diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_RedirectVisual.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_RedirectVisual.cs index 61c32d9c9f2e..a5fc538384c5 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_RedirectVisual.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_RedirectVisual.cs @@ -18,7 +18,6 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Composition; [TestClass] public class Given_RedirectVisual { -#if __SKIA__ [TestMethod] [RunsOnUIThread] [Ignore("Disabled because of https://github.com/unoplatform/uno-private/issues/307")] @@ -65,5 +64,4 @@ await UITestHelper.Load(new Grid return (await UITestHelper.ScreenShot(expected), await UITestHelper.ScreenShot(sut)); } -#endif } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ShapeVisual.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ShapeVisual.cs index 1d08b06fdfdd..60b331d24774 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ShapeVisual.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_ShapeVisual.cs @@ -5,6 +5,7 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Hosting; using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Imaging; using Private.Infrastructure; using Uno.UI.RuntimeTests.Helpers; @@ -14,7 +15,9 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Composition; [RunsOnUIThread] public class Given_ShapeVisual { -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [RequiresFullWindow] [TestMethod] public async Task When_ShapeVisual_ViewBox_Shape_Combinations() @@ -73,7 +76,7 @@ public async Task When_ShapeVisual_ViewBox_Shape_Combinations() { Width = 500, Height = 500, - Source = new Uri($"ms-appx:/Assets/When_ShapeVisual_ViewBox_Shape_Combinations/{filename}") + Source = new BitmapImage(new Uri($"ms-appx:/Assets/When_ShapeVisual_ViewBox_Shape_Combinations/{filename}")) }; var imageOpened = false; @@ -96,5 +99,4 @@ public async Task When_ShapeVisual_ViewBox_Shape_Combinations() } } } -#endif } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_ViewManagement_ApplicationView/Given_Control.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_ViewManagement_ApplicationView/Given_Control.cs index 06073fbb60f7..19bfc615c5dd 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_ViewManagement_ApplicationView/Given_Control.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_ViewManagement_ApplicationView/Given_Control.cs @@ -19,7 +19,9 @@ public class Given_ApplicationView public static string StartupTitle { get; set; } -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [TestMethod] public void When_StartupTitle_Is_Defined() { @@ -30,14 +32,14 @@ public void When_StartupTitle_Is_Defined() Assert.AreEqual(Windows.ApplicationModel.Package.Current.DisplayName, StartupTitle); } -#endif -#if __ANDROID__ +#if !__ANDROID__ + [Ignore] +#endif [TestMethod] public void When_StartupVisibleBounds_Has_Value() { Assert.IsFalse(RectHelper.GetIsEmpty(StartupVisibleBounds), $"VisibleBounds should not be empty"); } -#endif } } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_BackgroundTransition.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_BackgroundTransition.cs index 6ae08fa2e93c..dd3a341de2d3 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_BackgroundTransition.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_BackgroundTransition.cs @@ -16,7 +16,9 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml; [RunsOnUIThread] public class Given_BackgroundTransition { -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [TestMethod] [DataRow(typeof(Grid))] [DataRow(typeof(StackPanel))] @@ -64,9 +66,12 @@ public async Task When_Has_Brush_Transition(Type type) var bitmap = await UITestHelper.ScreenShot(control); - ImageAssert.HasColorAt(bitmap, new Point(100, 100), new Color(255, 127, 0, 127), tolerance: 30); + ImageAssert.HasColorAt(bitmap, new Point(100, 100), Color.FromArgb(255, 127, 0, 127), tolerance: 30); } +#if !__SKIA__ + [Ignore] +#endif [TestMethod] public async Task When_Animation_With_Brush_Transition() { @@ -130,5 +135,4 @@ public async Task When_Animation_With_Brush_Transition() bitmap = await UITestHelper.ScreenShot(SUT); ImageAssert.HasColorAt(bitmap, new Point(bitmap.Width / 2, bitmap.Height / 2), new Color(255, 127, 0, 127), tolerance: 20); } -#endif } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_FrameworkElement_Opacity.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_FrameworkElement_Opacity.cs index c820f5574922..748a93eb3959 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_FrameworkElement_Opacity.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml/Given_FrameworkElement_Opacity.cs @@ -30,7 +30,9 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Controls public class Given_FrameworkElement_Opacity { -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [TestMethod] public async Task When_Opacity() { @@ -61,6 +63,9 @@ public async Task When_Opacity() ImageAssert.HasColorAtChild(si, SUT.ImageOpacity0_5, width / 2, height / 2, "#FFFEF3C2"); } +#if !__SKIA__ + [Ignore] +#endif [TestMethod] public async Task When_Opacity_Inner() { @@ -94,6 +99,5 @@ public async Task When_Opacity_Inner() height = SUT.ImageInner0_5.ActualHeight; ImageAssert.HasColorAtChild(si, SUT.ImageInner0_5, width / 2, height / 2, "#FFFEF9E1", tolerance: 1); } -#endif } } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs index dde3db53bc62..751a223bf12a 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_CalendarDatePicker.cs @@ -12,11 +12,14 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Controls; +#if !WINAPPSDK [TestClass] [RunsOnUIThread] public class Given_CalendarDatePicker { -#if !WINAPPSDK && !__MACOS__ // test is failling in macOS for some reason. +#if __MACOS__ + [Ignore("test is failling in macOS for some reason.")] +#endif [TestMethod] public async Task TestCalendarPanelSize() { @@ -36,9 +39,10 @@ public async Task TestCalendarPanelSize() flyout.Close(); } -#endif -#if !WINAPPSDK && !__MACOS__ +#if __MACOS__ + [Ignore] +#endif [TestMethod] public async Task When_Theme_Changes() { @@ -125,5 +129,5 @@ public async Task When_Theme_Changes() } } } -#endif } +#endif diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_AcrylicBrush.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_AcrylicBrush.cs index 2d12fff79f00..44df473c9466 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_AcrylicBrush.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_AcrylicBrush.cs @@ -17,10 +17,10 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Media; +#if __SKIA__ [TestClass] public class Given_AcrylicBrush { -#if __SKIA__ && HAS_UNO [TestMethod] [RunsOnUIThread] public async Task When_Drawn() @@ -109,5 +109,5 @@ public async Task When_Drawn() return (expectedImg, actualImg); } -#endif } +#endif \ No newline at end of file diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_BasicAutomatedTransformation.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_BasicAutomatedTransformation.cs index 37934691a2fa..fbe3ced7457b 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_BasicAutomatedTransformation.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_BasicAutomatedTransformation.cs @@ -8,15 +8,15 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Media { + //Web Assembly does not have a helper that take screenshots yet + //MacOs interprets colors differently +#if !__WASM__ && !__MACOS__ + [Ignore] +#endif [TestClass] [RunsOnUIThread] public class Basics_AutomatedTransformation { - - //Web Assembly does not have a helper that take screenshots yet - //MacOs interprets colors differently -#if !__WASM__ && !__MACOS__ - private const string White = "#FFFFFF"; private const float PixelIncertitude = 2; @@ -219,7 +219,6 @@ private void Assert(FrameworkElement SUT, RawBitmap result, float x, float y, st ImageAssert.HasColorAt(result, x, y, color, tolerance: 25); } -#endif } } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_XamlCompositionBrushBase.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_XamlCompositionBrushBase.cs index 57dd387c0d6b..354f4862780b 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_XamlCompositionBrushBase.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_XamlCompositionBrushBase.cs @@ -19,7 +19,9 @@ namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Media; [TestClass] public class Given_XamlCompositionBrushBase { -#if __SKIA__ +#if !__SKIA__ + [Ignore] +#endif [TestMethod] [RunsOnUIThread] public async Task When_CompositionBrush_Changes() @@ -83,5 +85,4 @@ private class TestBrush : Microsoft.UI.Xaml.Media.XamlCompositionBrushBase return (ss1, ss2); } -#endif }