osu.Framework.Tests/Visual/UserInterface/TestCaseNestedMenus.cs
/// <summary>
/// Tests if hovering over menu items respects the <see cref="Menu.HoverOpenDelay"/>.
/// </summary>
Tests if hovering over menu items respects the .
Tests if hovering over menu items respects the .
[Test]
        public void TestHoverOpen()
        {
            AddStep("Click item", () => clickItem(0, 1));
            AddStep("Hover item", () => InputManager.MoveMouseTo(menus.GetSubStructure(1).GetMenuItems()[0]));
            AddAssert("Check closed", () => menus.GetSubMenu(2)?.State != MenuState.Open);
            AddAssert("Check open", () => menus.GetSubMenu(2).State == MenuState.Open);
            AddStep("Hover item", () => InputManager.MoveMouseTo(menus.GetSubStructure(2).GetMenuItems()[0]));
            AddAssert("Check closed", () => menus.GetSubMenu(3)?.State != MenuState.Open);
            AddAssert("Check open", () => menus.GetSubMenu(3).State == MenuState.Open);
        }
[ Test ] public void TestHoverOpen ( ) { AddStep ( " " , ( ) => clickItem ( 0 , 1 ) ) ; AddStep ( " " , ( ) => InputManager . MoveMouseTo ( menus . GetSubStructure ( 1 ) . GetMenuItems ( ) [ 0 ] ) ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 2 ) ? . State != MenuState . Open ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 2 ) . State == MenuState . Open ) ; AddStep ( " " , ( ) => InputManager . MoveMouseTo ( menus . GetSubStructure ( 2 ) . GetMenuItems ( ) [ 0 ] ) ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 3 ) ? . State != MenuState . Open ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 3 ) . State == MenuState . Open ) ; }
Tests if hovering over menu items respects the .
Tests if hovering over menu items respects the .