mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Rebased onto v2_2491-Overlapped
This commit is contained in:
@@ -170,6 +170,7 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
|
||||
Assert.True (menu.NewKeyDownEvent (menu.Key));
|
||||
Assert.True (menu.IsMenuOpen);
|
||||
top.Dispose ();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -314,7 +315,7 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
[AutoInitShutdown (configLocation: ConfigurationManager.ConfigLocations.DefaultOnly)]
|
||||
public void Disabled_MenuBar_Is_Never_Opened ()
|
||||
{
|
||||
Toplevel top = new ();
|
||||
@@ -340,7 +341,7 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
[AutoInitShutdown (configLocation: ConfigurationManager.ConfigLocations.DefaultOnly)]
|
||||
public void Disabled_MenuItem_Is_Never_Selected ()
|
||||
{
|
||||
var menu = new MenuBar
|
||||
@@ -455,6 +456,8 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Toplevel top = new ();
|
||||
var win = new Window ();
|
||||
@@ -684,12 +687,14 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
[AutoInitShutdown]
|
||||
public void Draw_A_Menu_Over_A_Top_Dialog ()
|
||||
{
|
||||
((FakeDriver)Application.Driver).SetBufferSize (40, 15);
|
||||
|
||||
// Override CM
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
|
||||
((FakeDriver)Application.Driver).SetBufferSize (40, 15);
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Assert.Equal (new (0, 0, 40, 15), Application.Driver?.Clip);
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (@"", output);
|
||||
|
||||
Reference in New Issue
Block a user