mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Re-remove PopoverButton class with better test fix
This commit is contained in:
@ -10,6 +10,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
@ -79,7 +80,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ClickButtonWhenEnabled<CountdownButton>();
|
ClickButtonWhenEnabled<CountdownButton>();
|
||||||
AddStep("click the first countdown button", () =>
|
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.MoveMouseTo(popoverButton);
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
@ -97,7 +98,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ClickButtonWhenEnabled<CountdownButton>();
|
ClickButtonWhenEnabled<CountdownButton>();
|
||||||
AddStep("click the first countdown button", () =>
|
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.MoveMouseTo(popoverButton);
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
@ -150,7 +151,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ClickButtonWhenEnabled<CountdownButton>();
|
ClickButtonWhenEnabled<CountdownButton>();
|
||||||
AddStep("click the first countdown button", () =>
|
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.MoveMouseTo(popoverButton);
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
@ -173,7 +174,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ClickButtonWhenEnabled<CountdownButton>();
|
ClickButtonWhenEnabled<CountdownButton>();
|
||||||
AddStep("click the first countdown button", () =>
|
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.MoveMouseTo(popoverButton);
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
|
|
||||||
foreach (var duration in available_delays)
|
foreach (var duration in available_delays)
|
||||||
{
|
{
|
||||||
flow.Add(new PopoverButton
|
flow.Add(new OsuButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = $"Start match in {duration.Humanize()}",
|
Text = $"Start match in {duration.Humanize()}",
|
||||||
@ -79,9 +79,5 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
|
|
||||||
return new OsuPopover { Child = flow };
|
return new OsuPopover { Child = flow };
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PopoverButton : OsuButton
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user