Files
Electron.NET/src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs
2025-12-07 11:56:32 +01:00

26 lines
902 B
C#

namespace ElectronNET.IntegrationTests.Tests
{
using ElectronNET.API;
using ElectronNET.API.Entities;
using ElectronNET.IntegrationTests.Common;
[Collection("ElectronCollection")]
public class BrowserViewTests : IntegrationTestBase
{
public BrowserViewTests(ElectronFixture fx) : base(fx)
{
}
[IntegrationFact]
public async Task Create_browser_view_and_adjust_bounds()
{
var view = await Electron.WindowManager.CreateBrowserViewAsync(new BrowserViewConstructorOptions());
this.MainWindow.SetBrowserView(view);
view.Bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 };
// Access bounds again (synchronous property fetch)
var current = view.Bounds;
current.Width.Should().Be(300);
current.Height.Should().Be(200);
}
}
}