Skip to content

Commit

Permalink
fix tests and remove extra newline
Browse files Browse the repository at this point in the history
  • Loading branch information
kongehund committed Dec 10, 2024
1 parent dffd7a8 commit 77cbe3d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions osu.Game.Rulesets.Osu.Tests/Editor/TestSceneContextMenuClose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public partial class TestSceneContextMenuClose : TestSceneOsuEditor
private ContextMenuContainer contextMenuContainer
=> Editor.ChildrenOfType<ContextMenuContainer>().First();


[Test]
public void TestDrawnSliderClosesMenu()
{
Expand All @@ -27,22 +26,22 @@ public void TestDrawnSliderClosesMenu()
AddStep("move mouse to top left of playfield", () =>
{
playfield = this.ChildrenOfType<Playfield>().Single();
var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight) / 4;
var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight / 4);
InputManager.MoveMouseTo(location);
});
AddStep("place circle", () => InputManager.Click(MouseButton.Left));
AddStep("right click circle", () => InputManager.Click(MouseButton.Right));
AddUntilStep("context menu is visible", () => contextMenuContainer.ChildrenOfType<OsuContextMenu>().Single().State == MenuState.Open);
AddStep("move mouse to bottom right of playfield", () =>
{
var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4;
var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight / 4);
InputManager.MoveMouseTo(location);
});
AddStep("select slider placement tool", () => InputManager.Key(Key.Number3));
AddStep("begin placement", () => InputManager.PressButton(MouseButton.Left));
AddStep("move mouse to top right of playfield", () =>
{
var location = (playfield.ScreenSpaceDrawQuad.TopRight + playfield.ScreenSpaceDrawQuad.BottomLeft) / 4;
var location = (playfield.ScreenSpaceDrawQuad.TopRight + playfield.ScreenSpaceDrawQuad.BottomLeft / 4);
InputManager.MoveMouseTo(location);
});
AddStep("end placement", () => InputManager.ReleaseButton(MouseButton.Left));
Expand All @@ -58,15 +57,15 @@ public void TestCircleClosesMenu()
AddStep("move mouse to top left of playfield", () =>
{
playfield = this.ChildrenOfType<Playfield>().Single();
var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight) / 4;
var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight / 4);
InputManager.MoveMouseTo(location);
});
AddStep("place circle", () => InputManager.Click(MouseButton.Left));
AddStep("right click circle", () => InputManager.Click(MouseButton.Right));
AddUntilStep("context menu is visible", () => contextMenuContainer.ChildrenOfType<OsuContextMenu>().Single().State == MenuState.Open);
AddStep("move mouse to bottom right of playfield", () =>
{
var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4;
var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight / 4);
InputManager.MoveMouseTo(location);
});
AddStep("place circle", () => InputManager.Click(MouseButton.Left));
Expand Down

0 comments on commit 77cbe3d

Please sign in to comment.