Skip to content

Commit b6ba78c

Browse files
committed
WebContentsTests: Experiment!
Re-enable some tests for CI as experiment
1 parent c90f003 commit b6ba78c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace ElectronNET.IntegrationTests.Tests
44
{
5+
using ElectronNET.API;
56
using ElectronNET.API.Entities;
67

78
[Collection("ElectronCollection")]
@@ -77,7 +78,7 @@ public async Task Can_basic_print()
7778
[SkippableFact(Timeout = 20000)]
7879
public async Task GetPrintersAsync_check()
7980
{
80-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null, "Skipping printer test in CI environment.");
81+
////Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null, "Skipping printer test in CI environment.");
8182
var info = await fx.MainWindow.WebContents.GetPrintersAsync();
8283
info.Should().NotBeNull();
8384
}
@@ -128,17 +129,14 @@ public async Task GetSetZoomLevel_check()
128129
[SkippableFact(Timeout = 20000)]
129130
public async Task DevTools_check()
130131
{
131-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX), "Skipping test on macOS CI.");
132+
////Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX), "Skipping test on macOS CI.");
132133
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse();
133134
fx.MainWindow.WebContents.OpenDevTools();
134135
await Task.Delay(500);
135136
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeTrue();
136137
fx.MainWindow.WebContents.CloseDevTools();
137138
await Task.Delay(500);
138139
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse();
139-
fx.MainWindow.WebContents.ToggleDevTools();
140-
await Task.Delay(500);
141-
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeTrue();
142140
}
143141

144142
[Fact(Timeout = 20000)]
@@ -162,12 +160,11 @@ public async Task GetSetAudioMuted_check()
162160
[SkippableFact(Timeout = 20000)]
163161
public async Task GetSetUserAgent_check()
164162
{
165-
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
166-
var ok = await fx.MainWindow.WebContents.GetUserAgentAsync();
167-
ok.Should().NotBeNullOrEmpty();
163+
////Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
164+
168165
fx.MainWindow.WebContents.SetUserAgent("MyUserAgent/1.0");
169166
await Task.Delay(1000);
170-
ok = await fx.MainWindow.WebContents.GetUserAgentAsync();
167+
var ok = await fx.MainWindow.WebContents.GetUserAgentAsync();
171168
ok.Should().Be("MyUserAgent/1.0");
172169
}
173170

0 commit comments

Comments
 (0)