Re-remove PopoverButton class with better test fix

This commit is contained in:
Dan Balasescu
2022-03-24 14:26:31 +09:00
parent 547418e47e
commit 90c7945bca
2 changed files with 6 additions and 9 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Platform;
using osu.Framework.Testing;
using osu.Framework.Utils;
@ -79,7 +80,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
ClickButtonWhenEnabled<CountdownButton>();
AddStep("click the first countdown button", () =>
{
var popoverButton = this.ChildrenOfType<CountdownButton.PopoverButton>().First();
var popoverButton = this.ChildrenOfType<Popover>().Single().ChildrenOfType<OsuButton>().First();
InputManager.MoveMouseTo(popoverButton);
InputManager.Click(MouseButton.Left);
});
@ -97,7 +98,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
ClickButtonWhenEnabled<CountdownButton>();
AddStep("click the first countdown button", () =>
{
var popoverButton = this.ChildrenOfType<CountdownButton.PopoverButton>().First();
var popoverButton = this.ChildrenOfType<Popover>().Single().ChildrenOfType<OsuButton>().First();
InputManager.MoveMouseTo(popoverButton);
InputManager.Click(MouseButton.Left);
});
@ -150,7 +151,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
ClickButtonWhenEnabled<CountdownButton>();
AddStep("click the first countdown button", () =>
{
var popoverButton = this.ChildrenOfType<CountdownButton.PopoverButton>().First();
var popoverButton = this.ChildrenOfType<Popover>().Single().ChildrenOfType<OsuButton>().First();
InputManager.MoveMouseTo(popoverButton);
InputManager.Click(MouseButton.Left);
});
@ -173,7 +174,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
ClickButtonWhenEnabled<CountdownButton>();
AddStep("click the first countdown button", () =>
{
var popoverButton = this.ChildrenOfType<CountdownButton.PopoverButton>().First();
var popoverButton = this.ChildrenOfType<Popover>().Single().ChildrenOfType<OsuButton>().First();
InputManager.MoveMouseTo(popoverButton);
InputManager.Click(MouseButton.Left);
});