mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 07:43:00 +08:00
Fix test failure
This commit is contained in:
parent
1e2cac3e92
commit
1f41261fc7
@ -16,6 +16,7 @@ using osu.Framework.Platform;
|
|||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
|
using osu.Game.Beatmaps.Drawables.Cards;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
@ -317,13 +318,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
p.RequestResults = _ => resultsRequested = true;
|
p.RequestResults = _ => resultsRequested = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("wait for load", () => playlist.ChildrenOfType<DrawableLinkCompiler>().Any() && playlist.ChildrenOfType<BeatmapCardThumbnail>().First().DrawWidth > 0);
|
||||||
AddStep("move mouse to first item title", () =>
|
AddStep("move mouse to first item title", () =>
|
||||||
{
|
{
|
||||||
var drawQuad = playlist.ChildrenOfType<LinkFlowContainer>().First().ScreenSpaceDrawQuad;
|
var drawQuad = playlist.ChildrenOfType<LinkFlowContainer>().First().ScreenSpaceDrawQuad;
|
||||||
var location = (drawQuad.TopLeft + drawQuad.BottomLeft) / 2 + new Vector2(drawQuad.Width * 0.2f, 0);
|
var location = (drawQuad.TopLeft + drawQuad.BottomLeft) / 2 + new Vector2(drawQuad.Width * 0.2f, 0);
|
||||||
InputManager.MoveMouseTo(location);
|
InputManager.MoveMouseTo(location);
|
||||||
});
|
});
|
||||||
AddUntilStep("wait for text load", () => playlist.ChildrenOfType<DrawableLinkCompiler>().Any());
|
|
||||||
AddAssert("first item title not hovered", () => playlist.ChildrenOfType<DrawableLinkCompiler>().First().IsHovered, () => Is.False);
|
AddAssert("first item title not hovered", () => playlist.ChildrenOfType<DrawableLinkCompiler>().First().IsHovered, () => Is.False);
|
||||||
AddStep("click left mouse", () => InputManager.Click(MouseButton.Left));
|
AddStep("click left mouse", () => InputManager.Click(MouseButton.Left));
|
||||||
AddUntilStep("first item selected", () => playlist.ChildrenOfType<DrawableRoomPlaylistItem>().First().IsSelectedItem, () => Is.True);
|
AddUntilStep("first item selected", () => playlist.ChildrenOfType<DrawableRoomPlaylistItem>().First().IsSelectedItem, () => Is.True);
|
||||||
|
Loading…
Reference in New Issue
Block a user