Skip to content

Commit 46d395a

Browse files
committed
excluding some tests based on GitHub runner OS
1 parent c0e3a59 commit 46d395a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public async Task ZoomLevelProperty_check()
129129
[SkippableFact(Timeout = 20000)]
130130
public async Task DevTools_check()
131131
{
132-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null, "Skipping test in CI environment.");
132+
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX), "Skipping test on macOS CI.");
133133
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse();
134134
fx.MainWindow.WebContents.OpenDevTools();
135135
await Task.Delay(500);
@@ -172,6 +172,7 @@ public async Task AudioMutedProperty_check()
172172
[Fact(Timeout = 20000)]
173173
public async Task GetSetUserAgent_check()
174174
{
175+
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
175176
var ok = await fx.MainWindow.WebContents.GetUserAgentAsync();
176177
ok.Should().NotBeNullOrEmpty();
177178
fx.MainWindow.WebContents.SetUserAgent("MyUserAgent/1.0");
@@ -183,6 +184,7 @@ public async Task GetSetUserAgent_check()
183184
[Fact(Timeout = 20000)]
184185
public async Task UserAgentProperty_check()
185186
{
187+
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
186188
fx.MainWindow.WebContents.UserAgent.Should().NotBeNullOrEmpty();
187189
fx.MainWindow.WebContents.UserAgent = "MyUserAgent/1.0";
188190
fx.MainWindow.WebContents.UserAgent.Should().Be("MyUserAgent/1.0");

0 commit comments

Comments
 (0)