Switched back to Application.Begin not calling Refresh

This commit is contained in:
Tig
2024-10-22 12:29:12 -06:00
parent 6e98d10f34
commit 572901b5c0
2 changed files with 16 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (topLabel, sv, bottomLabel);
Application.Begin (top);
Application.Refresh ();
TestHelpers.AssertDriverContentsWithFrameAre (
@"
@@ -460,6 +461,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (sv);
Application.Begin (top);
Application.Refresh ();
Assert.Equal (new (-25, -25), sv.ContentOffset);
Assert.Equal (new (50, 50), sv.GetContentSize ());
@@ -495,6 +497,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (sv);
Application.Begin (top);
Application.Refresh ();
Assert.Equal (50, sv.GetContentSize ().Width);
Assert.Equal (50, sv.GetContentSize ().Height);
@@ -564,6 +567,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (win);
Application.Begin (top);
Application.Refresh ();
var expected = @"
┌──────────────────┐
@@ -894,6 +898,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (sv);
Application.Begin (top);
Application.Refresh ();
TestHelpers.AssertDriverContentsWithFrameAre (
@"
@@ -1080,6 +1085,7 @@ public class ScrollViewTests (ITestOutputHelper output)
var top = new Toplevel ();
top.Add (sv);
Application.Begin (top);
Application.Refresh ();
Assert.Equal (4, sv.Subviews.Count);
Assert.Equal (2, sv.Subviews [0].Subviews.Count);