mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-22 15:04:47 +00:00
rebase from develop, add timeouts to tests and attempt to skip NativeImageTests on Linux
This commit is contained in:
@@ -14,7 +14,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
this.fx = fx;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_set_and_get_title()
|
||||
{
|
||||
const string title = "Integration Test Title";
|
||||
@@ -23,7 +23,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
roundTrip.Should().Be(title);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_resize_and_get_size()
|
||||
{
|
||||
this.fx.MainWindow.SetSize(643, 482);
|
||||
@@ -33,7 +33,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
size[1].Should().Be(482);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_set_progress_bar_and_clear()
|
||||
{
|
||||
this.fx.MainWindow.SetProgressBar(0.5);
|
||||
@@ -42,7 +42,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
await Task.Delay(50);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_set_and_get_position()
|
||||
{
|
||||
this.fx.MainWindow.SetPosition(134, 246);
|
||||
@@ -51,7 +51,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
pos.Should().BeEquivalentTo([134, 246]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_set_and_get_bounds()
|
||||
{
|
||||
var bounds = new Rectangle { X = 10, Y = 20, Width = 400, Height = 300 };
|
||||
@@ -63,7 +63,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
round.Height.Should().Be(300);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Can_set_and_get_content_bounds()
|
||||
{
|
||||
var bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 };
|
||||
@@ -73,7 +73,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
round.Height.Should().BeGreaterThan(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Show_hide_visibility_roundtrip()
|
||||
{
|
||||
this.fx.MainWindow.Show();
|
||||
@@ -82,7 +82,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await this.fx.MainWindow.IsVisibleAsync()).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task AlwaysOnTop_toggle_and_query()
|
||||
{
|
||||
this.fx.MainWindow.SetAlwaysOnTop(true);
|
||||
@@ -91,7 +91,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await this.fx.MainWindow.IsAlwaysOnTopAsync()).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task MenuBar_auto_hide_and_visibility()
|
||||
{
|
||||
this.fx.MainWindow.SetAutoHideMenuBar(true);
|
||||
@@ -102,7 +102,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await this.fx.MainWindow.IsMenuBarVisibleAsync()).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task ReadyToShow_event_fires_after_content_ready()
|
||||
{
|
||||
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });
|
||||
@@ -122,7 +122,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
window.Show();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task PageTitleUpdated_event_fires_on_title_change()
|
||||
{
|
||||
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true });
|
||||
@@ -142,7 +142,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await tcs.Task).Should().Be("NewTitle");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Resize_event_fires_on_size_change()
|
||||
{
|
||||
var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });
|
||||
@@ -153,7 +153,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
resized.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Progress_bar_and_always_on_top_toggle()
|
||||
{
|
||||
var win = this.fx.MainWindow;
|
||||
@@ -165,7 +165,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await win.IsAlwaysOnTopAsync()).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Menu_bar_visibility_and_auto_hide()
|
||||
{
|
||||
var win = this.fx.MainWindow;
|
||||
@@ -175,7 +175,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
(await win.IsMenuBarVisibleAsync()).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Parent_child_relationship_roundtrip()
|
||||
{
|
||||
var child = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false, Width = 300, Height = 200 });
|
||||
@@ -188,7 +188,7 @@ namespace ElectronNET.IntegrationTests.Tests
|
||||
child.Destroy();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Timeout = 5000)]
|
||||
public async Task Represented_filename_and_edited_flags()
|
||||
{
|
||||
var win = this.fx.MainWindow;
|
||||
|
||||
Reference in New Issue
Block a user