Skip to content

Commit

Permalink
test: enable and fix Given_Launcher to run on skia
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Feb 20, 2024
1 parent 3faf589 commit 6cbcea2
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/Uno.UI.RuntimeTests/Tests/Windows_System/Given_Launcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if __ANDROID__ || __IOS__
#if __ANDROID__ || __IOS__ || __SKIA__
using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Windows.ApplicationModel.Core;
Expand Down Expand Up @@ -59,7 +60,14 @@ public async Task When_Settings_Uri_Is_Queried()
new Uri("ms-settings:network-wifi"),
LaunchQuerySupportType.Uri);

Assert.AreEqual(LaunchQuerySupportStatus.Available, result);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Assert.AreEqual(LaunchQuerySupportStatus.NotSupported, result);
}
else
{
Assert.AreEqual(LaunchQuerySupportStatus.Available, result);
}
}

[TestMethod]
Expand All @@ -69,7 +77,14 @@ public async Task When_Unsupported_Special_Uri_Is_Queried()
new Uri("ms-windows-store://home"),
LaunchQuerySupportType.Uri);

Assert.AreEqual(LaunchQuerySupportStatus.NotSupported, result);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Assert.AreEqual(LaunchQuerySupportStatus.Available, result);
}
else
{
Assert.AreEqual(LaunchQuerySupportStatus.NotSupported, result);
}
}

private async Task DispatchAsync(Func<Task> asyncAction)
Expand Down

0 comments on commit 6cbcea2

Please sign in to comment.