Skip to content

Commit

Permalink
Update grid placement tool test
Browse files Browse the repository at this point in the history
I somehow missed this test when splitting up PRs so here it is now
  • Loading branch information
OliBomby committed Oct 11, 2024
1 parent ada20d2 commit 56bfcde
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions osu.Game.Rulesets.Osu.Tests/Editor/TestSceneOsuEditorGrids.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ private void nextGridTypeIs<T>() where T : PositionSnapGrid
}

[Test]
public void TestGridFromPoints()
public void TestGridPlacementTool()
{
AddStep("enable rectangular grid", () => InputManager.Key(Key.Y));
AddStep("enable rectangular grid", () => InputManager.Key(Key.T));

AddStep("initiate grid from points", () => InputManager.Key(Key.B));
AddStep("start grid placement", () => InputManager.Key(Key.Number5));
AddStep("move cursor to slider head + (1, 1)", () =>
{
var composer = Editor.ChildrenOfType<RectangularPositionSnapGrid>().Single();
Expand Down Expand Up @@ -247,13 +247,17 @@ public void TestGridFromPoints()
return Precision.AlmostEquals(composer.GridLineRotation.Value, 0.09, 0.01);
});

AddStep("initiate grid from points", () => InputManager.Key(Key.B));
AddStep("start grid placement", () => InputManager.Key(Key.Number5));
AddStep("move cursor to slider tail + (1, 1)", () =>
{
var composer = Editor.ChildrenOfType<RectangularPositionSnapGrid>().Single();
InputManager.MoveMouseTo(composer.ToScreenSpace(((Slider)EditorBeatmap.HitObjects.First()).EndPosition + new Vector2(1, 1)));
});
AddStep("right click", () => InputManager.Click(MouseButton.Right));
AddStep("double click", () =>
{
InputManager.Click(MouseButton.Left);
InputManager.Click(MouseButton.Left);
});
AddStep("move cursor to (0, 0)", () =>
{
var composer = Editor.ChildrenOfType<RectangularPositionSnapGrid>().Single();
Expand Down

0 comments on commit 56bfcde

Please sign in to comment.