From 965da343a409fbcf714c05226ddcd8bbffdb9fdd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 1 Aug 2023 14:56:02 +0900 Subject: [PATCH] Fix tournament song bar tests not showing anything by default --- .../Components/TestSceneSongBar.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tournament.Tests/Components/TestSceneSongBar.cs b/osu.Game.Tournament.Tests/Components/TestSceneSongBar.cs index 762cfa2519..0f31192a9c 100644 --- a/osu.Game.Tournament.Tests/Components/TestSceneSongBar.cs +++ b/osu.Game.Tournament.Tests/Components/TestSceneSongBar.cs @@ -4,6 +4,7 @@ using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Testing; using osu.Game.Beatmaps.Legacy; using osu.Game.Tests.Visual; using osu.Game.Tournament.Components; @@ -17,11 +18,11 @@ public partial class TestSceneSongBar : OsuTestScene [Cached] private readonly LadderInfo ladder = new LadderInfo(); - [Test] - public void TestSongBar() - { - SongBar songBar = null!; + private SongBar songBar = null!; + [SetUpSteps] + public void SetUpSteps() + { AddStep("create bar", () => Child = songBar = new SongBar { RelativeSizeAxes = Axes.X, @@ -29,7 +30,11 @@ public void TestSongBar() Origin = Anchor.Centre }); AddUntilStep("wait for loaded", () => songBar.IsLoaded); + } + [Test] + public void TestSongBar() + { AddStep("set beatmap", () => { var beatmap = CreateAPIBeatmap(Ruleset.Value);