1
0
Fork 0

fix(ui): resolve pack URI assembly prefixes, crash-proof dynamic resource brush lookups, and add MainWindow visual tree test
Some checks failed
Forgejo Release / build-and-release (push) Has been cancelled

This commit is contained in:
Yun Chan 2026-09-03 12:30:21 +09:00
parent c00c55f9e6
commit 41c8a8a94b
4 changed files with 44 additions and 17 deletions

View file

@ -53,6 +53,28 @@ public class DesignAuditVisualTreeTests
}
}
[Fact]
public void MainWindow_MeasureAndArrange_HasValidLayoutBounds()
{
RunOnSta(() =>
{
var engine = Everything2EverythingBootstrap.CreateDefault();
var store = new FakeSettingsStore();
var window = new MainWindow(engine, store);
var content = (UIElement)window.Content;
content.Measure(new Size(1200, 800));
content.Arrange(new Rect(0, 0, 1200, 800));
Assert.False(double.IsNaN(content.DesiredSize.Width));
Assert.False(double.IsNaN(content.DesiredSize.Height));
Assert.True(content.DesiredSize.Width > 0);
Assert.True(content.DesiredSize.Height > 0);
var buttons = FindLogicalChildren<ButtonBase>(window).ToList();
Assert.NotEmpty(buttons);
});
}
[Fact]
public void DiagnoseWindow_MeasureAndArrange_HasValidLayoutBounds()
{