mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-24 07:54:43 +00:00
adding a couple await Task.Delay(500); to test in order to resolve flaky tests
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
var test = await Electron.AutoUpdater.RequestHeadersAsync;
|
||||
test.Should().BeNull();
|
||||
Electron.AutoUpdater.RequestHeaders = headers;
|
||||
await Task.Delay(500);
|
||||
test = await Electron.AutoUpdater.RequestHeadersAsync;
|
||||
test.Should().NotBeNull();
|
||||
test.Count.Should().Be(1);
|
||||
|
||||
@@ -132,13 +132,13 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null, "Skipping test in CI environment.");
|
||||
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse();
|
||||
fx.MainWindow.WebContents.OpenDevTools();
|
||||
await Task.Delay(1000);
|
||||
await Task.Delay(500);
|
||||
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeTrue();
|
||||
fx.MainWindow.WebContents.CloseDevTools();
|
||||
await Task.Delay(1000);
|
||||
await Task.Delay(500);
|
||||
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeFalse();
|
||||
fx.MainWindow.WebContents.ToggleDevTools();
|
||||
await Task.Delay(1000);
|
||||
await Task.Delay(500);
|
||||
fx.MainWindow.WebContents.IsDevToolsOpened().Should().BeTrue();
|
||||
}
|
||||
|
||||
@@ -146,9 +146,11 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
public async Task GetSetAudioMuted_check()
|
||||
{
|
||||
fx.MainWindow.WebContents.SetAudioMuted(true);
|
||||
await Task.Delay(500);
|
||||
var ok = await fx.MainWindow.WebContents.IsAudioMutedAsync();
|
||||
ok.Should().BeTrue();
|
||||
fx.MainWindow.WebContents.SetAudioMuted(false);
|
||||
await Task.Delay(500);
|
||||
ok = await fx.MainWindow.WebContents.IsAudioMutedAsync();
|
||||
ok.Should().BeFalse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user