From 46d395ad128260fd51c0e3294366d347598ef328 Mon Sep 17 00:00:00 2001 From: agracio Date: Thu, 4 Dec 2025 20:31:14 +0000 Subject: [PATCH] excluding some tests based on GitHub runner OS --- src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs index 628acbe..d3ac640 100644 --- a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs @@ -129,7 +129,7 @@ namespace ElectronNET.IntegrationTests.Tests [SkippableFact(Timeout = 20000)] public async Task DevTools_check() { - Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null, "Skipping test in CI environment."); + Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX), "Skipping test on macOS CI."); fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse(); fx.MainWindow.WebContents.OpenDevTools(); await Task.Delay(500); @@ -172,6 +172,7 @@ namespace ElectronNET.IntegrationTests.Tests [Fact(Timeout = 20000)] public async Task GetSetUserAgent_check() { + Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI."); var ok = await fx.MainWindow.WebContents.GetUserAgentAsync(); ok.Should().NotBeNullOrEmpty(); fx.MainWindow.WebContents.SetUserAgent("MyUserAgent/1.0"); @@ -183,6 +184,7 @@ namespace ElectronNET.IntegrationTests.Tests [Fact(Timeout = 20000)] public async Task UserAgentProperty_check() { + Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI."); fx.MainWindow.WebContents.UserAgent.Should().NotBeNullOrEmpty(); fx.MainWindow.WebContents.UserAgent = "MyUserAgent/1.0"; fx.MainWindow.WebContents.UserAgent.Should().Be("MyUserAgent/1.0");