mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Tons of Layout refactoring. LayoutSubviews is now internal.
This commit is contained in:
@@ -51,8 +51,8 @@ public class DialogTests
|
||||
// Now add a second button
|
||||
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {CM.Glyphs.VLine}";
|
||||
dlg.AddButton (new () { Text = btn2Text });
|
||||
var first = false;
|
||||
RunIteration (ref runstate, ref first);
|
||||
|
||||
RunIteration (ref runstate);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
dlg.Dispose ();
|
||||
@@ -76,8 +76,7 @@ public class DialogTests
|
||||
// Now add a second button
|
||||
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2}{CM.Glyphs.VLine}";
|
||||
dlg.AddButton (new () { Text = btn2Text });
|
||||
first = false;
|
||||
RunIteration (ref runstate, ref first);
|
||||
RunIteration (ref runstate);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
dlg.Dispose ();
|
||||
@@ -101,8 +100,8 @@ public class DialogTests
|
||||
// Now add a second button
|
||||
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2}{CM.Glyphs.VLine}";
|
||||
dlg.AddButton (new () { Text = btn2Text });
|
||||
first = false;
|
||||
RunIteration (ref runstate, ref first);
|
||||
|
||||
RunIteration (ref runstate);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
dlg.Dispose ();
|
||||
@@ -126,8 +125,8 @@ public class DialogTests
|
||||
// Now add a second button
|
||||
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {CM.Glyphs.VLine}";
|
||||
dlg.AddButton (new () { Text = btn2Text });
|
||||
first = false;
|
||||
RunIteration (ref runstate, ref first);
|
||||
|
||||
RunIteration (ref runstate);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
dlg.Dispose ();
|
||||
@@ -849,7 +848,7 @@ public class DialogTests
|
||||
button2 = new Button { Text = btn2Text };
|
||||
(runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Center, button1, button2);
|
||||
button1.Visible = false;
|
||||
RunIteration (ref runstate, ref firstIteration);
|
||||
RunIteration (ref runstate, firstIteration);
|
||||
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
@@ -861,7 +860,7 @@ public class DialogTests
|
||||
button2 = new Button { Text = btn2Text };
|
||||
(runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Fill, button1, button2);
|
||||
button1.Visible = false;
|
||||
RunIteration (ref runstate, ref firstIteration);
|
||||
RunIteration (ref runstate, firstIteration);
|
||||
buttonRow = $@"{CM.Glyphs.VLine} {btn2}{CM.Glyphs.VLine}";
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
@@ -873,7 +872,7 @@ public class DialogTests
|
||||
button2 = new Button { Text = btn2Text };
|
||||
(runstate, dlg) = RunButtonTestDialog (title, width, Alignment.End, button1, button2);
|
||||
button1.Visible = false;
|
||||
RunIteration (ref runstate, ref firstIteration);
|
||||
RunIteration (ref runstate, firstIteration);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
dlg.Dispose ();
|
||||
@@ -884,7 +883,7 @@ public class DialogTests
|
||||
button2 = new Button { Text = btn2Text };
|
||||
(runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Start, button1, button2);
|
||||
button1.Visible = false;
|
||||
RunIteration (ref runstate, ref firstIteration);
|
||||
RunIteration (ref runstate, firstIteration);
|
||||
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
||||
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
||||
End (runstate);
|
||||
|
||||
@@ -31,10 +31,10 @@ public class WizardTests ()
|
||||
|
||||
RunState runstate = Application.Begin (wizard);
|
||||
var firstIteration = true;
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.RunIteration (ref runstate, firstIteration);
|
||||
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.RunIteration (ref runstate, firstIteration);
|
||||
Application.End (runstate);
|
||||
Assert.True (finishedFired);
|
||||
Assert.True (closedFired);
|
||||
@@ -56,7 +56,7 @@ public class WizardTests ()
|
||||
wizard.Closed += (s, e) => { closedFired = true; };
|
||||
|
||||
runstate = Application.Begin (wizard);
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.RunIteration (ref runstate, firstIteration);
|
||||
|
||||
Assert.Equal (step1.Title, wizard.CurrentStep.Title);
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
@@ -90,7 +90,7 @@ public class WizardTests ()
|
||||
wizard.Closed += (s, e) => { closedFired = true; };
|
||||
|
||||
runstate = Application.Begin (wizard);
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.RunIteration (ref runstate, firstIteration);
|
||||
|
||||
Assert.Equal (step2.Title, wizard.CurrentStep.Title);
|
||||
Assert.Equal (wizard.GetLastStep ().Title, wizard.CurrentStep.Title);
|
||||
@@ -464,7 +464,7 @@ public class WizardTests ()
|
||||
//wizard.LayoutSubviews ();
|
||||
var firstIteration = false;
|
||||
RunState runstate = Application.Begin (wizard);
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.RunIteration (ref runstate, firstIteration);
|
||||
|
||||
// TODO: Disabled until Dim.Auto is used in Dialog
|
||||
//TestHelpers.AssertDriverContentsWithFrameAre (
|
||||
|
||||
Reference in New Issue
Block a user