diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs index e896b0fab6..289c01fbf3 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneDeleteLocalScore.cs @@ -123,16 +123,26 @@ public void Setup() => Schedule(() => // Due to soft deletions, we can re-use deleted scores between test runs scoreManager.Undelete(scoreManager.QueryScores(s => s.DeletePending).ToList()); + leaderboard.Scores = null; + leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables + leaderboard.Beatmap = beatmap; - leaderboard.RefreshScores(); + leaderboard.RefreshScores(); // Required in the case that the beatmap hasn't changed }); + [SetUpSteps] + public void SetupSteps() + { + // Ensure the leaderboard has finished async-loading drawables + AddUntilStep("wait for drawables", () => leaderboard.ChildrenOfType().Any()); + + // Ensure the leaderboard items have finished showing up + AddStep("finish transforms", () => leaderboard.FinishTransforms(true)); + } + [Test] public void TestDeleteViaRightClick() { - // Ensure the leaderboard items have finished showing up - AddStep("finish transforms", () => leaderboard.FinishTransforms(true)); - AddStep("open menu for top score", () => { InputManager.MoveMouseTo(leaderboard.ChildrenOfType().First());