-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30377 from bdach/very-bad-completely-no-good-comp…
…arer Fix timeline blueprints sometimes causing crashes due to current placement blueprint becoming unsorted
- Loading branch information
Showing
5 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
osu.Game.Rulesets.Taiko.Tests/Editor/TestSceneEditorPlacement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Linq; | ||
using NUnit.Framework; | ||
using osu.Framework.Graphics.UserInterface; | ||
using osu.Framework.Testing; | ||
using osu.Game.Graphics.UserInterface; | ||
using osu.Game.Rulesets.Taiko.Objects; | ||
using osu.Game.Rulesets.Taiko.Objects.Drawables; | ||
using osu.Game.Tests.Visual; | ||
using osuTK.Input; | ||
|
||
namespace osu.Game.Rulesets.Taiko.Tests.Editor | ||
{ | ||
public partial class TestSceneEditorPlacement : EditorTestScene | ||
{ | ||
protected override Ruleset CreateEditorRuleset() => new TaikoRuleset(); | ||
|
||
[Test] | ||
public void TestPlacementBlueprintDoesNotCauseCrashes() | ||
{ | ||
AddStep("clear objects", () => EditorBeatmap.Clear()); | ||
AddStep("add two objects", () => | ||
{ | ||
EditorBeatmap.Add(new Hit { StartTime = 1818 }); | ||
EditorBeatmap.Add(new Hit { StartTime = 1584 }); | ||
}); | ||
AddStep("seek back", () => EditorClock.Seek(1584)); | ||
AddStep("choose hit placement tool", () => InputManager.Key(Key.Number2)); | ||
AddStep("hover over first hit", () => InputManager.MoveMouseTo(Editor.ChildrenOfType<DrawableHit>().ElementAt(1))); | ||
AddStep("hover over second hit", () => InputManager.MoveMouseTo(Editor.ChildrenOfType<DrawableHit>().ElementAt(0))); | ||
AddStep("right click", () => InputManager.Click(MouseButton.Right)); | ||
AddUntilStep("context menu open", () => Editor.ChildrenOfType<OsuContextMenu>().Any(menu => menu.State == MenuState.Open)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters