mirror of
https://github.com/ppy/osu
synced 2025-02-09 06:36:56 +00:00
Fix test not working due to popover container being too global
This commit is contained in:
parent
9d693c75cf
commit
d609839ff6
@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
@ -60,7 +63,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("add room", () => RoomManager.AddRooms(1, withPassword: true));
|
AddStep("add room", () => RoomManager.AddRooms(1, withPassword: true));
|
||||||
AddStep("select room", () => InputManager.Key(Key.Down));
|
AddStep("select room", () => InputManager.Key(Key.Down));
|
||||||
AddStep("attempt join room", () => InputManager.Key(Key.Enter));
|
AddStep("attempt join room", () => InputManager.Key(Key.Enter));
|
||||||
AddUntilStep("password prompt appeared", () => (passwordEntryPopover = loungeScreen.ChildrenOfType<DrawableRoom.PasswordEntryPopover>().FirstOrDefault()) != null);
|
AddUntilStep("password prompt appeared", () => (passwordEntryPopover = InputManager.ChildrenOfType<DrawableRoom.PasswordEntryPopover>().FirstOrDefault()) != null);
|
||||||
AddStep("enter password in text box", () => passwordEntryPopover.ChildrenOfType<TextBox>().First().Text = "password");
|
AddStep("enter password in text box", () => passwordEntryPopover.ChildrenOfType<TextBox>().First().Text = "password");
|
||||||
AddStep("press join room button", () => passwordEntryPopover.ChildrenOfType<OsuButton>().First().Click());
|
AddStep("press join room button", () => passwordEntryPopover.ChildrenOfType<OsuButton>().First().Click());
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Testing.Input;
|
using osu.Framework.Testing.Input;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
@ -35,8 +36,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
MenuCursorContainer cursorContainer;
|
MenuCursorContainer cursorContainer;
|
||||||
|
|
||||||
CompositeDrawable mainContent =
|
CompositeDrawable mainContent =
|
||||||
(cursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both })
|
new PopoverContainer { RelativeSizeAxes = Axes.Both }
|
||||||
.WithChild(content = new OsuTooltipContainer(cursorContainer.Cursor) { RelativeSizeAxes = Axes.Both });
|
.WithChild(cursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both })
|
||||||
|
.WithChild(content = new OsuTooltipContainer(cursorContainer.Cursor) { RelativeSizeAxes = Axes.Both });
|
||||||
|
|
||||||
if (CreateNestedActionContainer)
|
if (CreateNestedActionContainer)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user