Relax test timings

This commit is contained in:
softworkz
2026-02-14 21:54:45 +01:00
parent 09c735a10f
commit 41c5b5af62
2 changed files with 7 additions and 3 deletions

View File

@@ -266,9 +266,11 @@ namespace ElectronNET.IntegrationTests.Tests
try
{
window = await Electron.WindowManager.CreateWindowAsync(
new BrowserWindowOptions { Show = false, Width = 300, Height = 200 },
new BrowserWindowOptions { Show = true, Width = 300, Height = 200 },
"about:blank");
await Task.Delay(5.seconds());
var tcs = new TaskCompletionSource<Rectangle>(TaskCreationOptions.RunContinuationsAsynchronously);
window.OnBoundsChanged += bounds => tcs.TrySetResult(bounds);

View File

@@ -174,13 +174,15 @@ namespace ElectronNET.IntegrationTests.Tests
try
{
await Task.Delay(1.seconds());
window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank");
await Task.Delay(3.seconds());
await Task.Delay(5.seconds());
window.WebContents.SetUserAgent("MyUserAgent/1.0");
await Task.Delay(1.seconds());
await Task.Delay(2.seconds());
var ok = await window.WebContents.GetUserAgentAsync();
ok.Should().Be("MyUserAgent/1.0");