From d6f44da7bcfc30f8f2937f01e8260cd840552dea Mon Sep 17 00:00:00 2001 From: Binary Alley Date: Sat, 29 Aug 2026 17:35:57 +0300 Subject: [PATCH] Makes the file system browser fallback view test platform independent --- .../ViewComponents/FileSystemBrowserViewComponentTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/UnitTests/Lumina.Presentation.Web.UnitTests/Core/ViewComponents/FileSystemBrowserViewComponentTests.cs b/tests/UnitTests/Lumina.Presentation.Web.UnitTests/Core/ViewComponents/FileSystemBrowserViewComponentTests.cs index eb8411be..b893a721 100644 --- a/tests/UnitTests/Lumina.Presentation.Web.UnitTests/Core/ViewComponents/FileSystemBrowserViewComponentTests.cs +++ b/tests/UnitTests/Lumina.Presentation.Web.UnitTests/Core/ViewComponents/FileSystemBrowserViewComponentTests.cs @@ -11,6 +11,7 @@ using Microsoft.Extensions.Localization; using NSubstitute; using System; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; #endregion @@ -68,7 +69,8 @@ public class FileSystemBrowserViewComponentTests Assert.NotNull(viewResult.ViewData); Assert.NotNull(viewResult.ViewData!.Model); dynamic model = viewResult.ViewData!.Model!; - Assert.Equal("/", (string)model.Path); + string expectedPath = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? @"/" : @"C:\Users\"; + Assert.Equal(expectedPath, (string)model.Path); Assert.Equal("list", (string)model.ViewMode); Assert.Equal("large", (string)model.IconSize); }