Skip to content

Commit

Permalink
Merge pull request #16577 from Youssef1313/skip-flaky
Browse files Browse the repository at this point in the history
test: Skip SetOffsetsBeforeLoading test as it's flaky
  • Loading branch information
ramezgerges committed May 4, 2024
2 parents 9e0f20d + 07c65e4 commit 5682ca9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/Uno.UI.RuntimeTests/Helpers/ConditionalTestAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using Private.Infrastructure;

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

Expand All @@ -10,10 +11,11 @@ public enum RuntimeTestPlatform
SkiaWpf = 1 << 1,
SkiaX11 = 1 << 2,
SkiaMacOS = 1 << 3,
Wasm = 1 << 4,
Android = 1 << 5,
iOS = 1 << 6,
macOSCatalyst = 1 << 7,
SkiaIslands = 1 << 4,
Wasm = 1 << 5,
Android = 1 << 6,
iOS = 1 << 7,
macOSCatalyst = 1 << 8,
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
Expand Down Expand Up @@ -56,6 +58,7 @@ private static bool ShouldRun(RuntimeTestPlatform singlePlatform)
RuntimeTestPlatform.SkiaWpf => IsSkiaWpf(),
RuntimeTestPlatform.SkiaX11 => IsSkiaX11(),
RuntimeTestPlatform.SkiaMacOS => IsSkiaMacOS(),
RuntimeTestPlatform.SkiaIslands => TestServices.WindowHelper.IsXamlIsland,
RuntimeTestPlatform.Wasm => IsWasm(),
RuntimeTestPlatform.Android => IsAndroid(),
RuntimeTestPlatform.iOS => IsIOS(),
Expand All @@ -66,7 +69,7 @@ private static bool ShouldRun(RuntimeTestPlatform singlePlatform)

private static bool IsSkiaHostAssembly(string name)
#if __SKIA__
=> Microsoft.UI.Xaml.Application.Current.Host.GetType().Assembly.GetName().Name == name;
=> Microsoft.UI.Xaml.Application.Current.Host?.GetType().Assembly.GetName().Name == name;
#else
=> false;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ private async Task ConsecutiveZoomAndScrollJumps(bool isZoomRelative, bool isScr
});
}

[TestMethod]
[ConditionalTest(IgnoredPlatforms = RuntimeTestPlatform.SkiaX11)]
[TestProperty("Description", "Requests a non-animated offsets change before loading scrollPresenter.")]
public async Task SetOffsetsBeforeLoading()
{
Expand Down

0 comments on commit 5682ca9

Please sign in to comment.