1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 19:22:58 +08:00

Fix "welcome" intro test failure due to no wait logic

This commit is contained in:
Dean Herbert 2020-07-01 19:02:05 +09:00
parent 4ae70f2679
commit 4e839e4f1f

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Audio.Track;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Screens.Menu; using osu.Game.Screens.Menu;
@ -14,15 +15,11 @@ namespace osu.Game.Tests.Visual.Menus
public TestSceneIntroWelcome() public TestSceneIntroWelcome()
{ {
AddAssert("check if menu music loops", () => AddUntilStep("wait for load", () => getTrack() != null);
{
var menu = IntroStack?.CurrentScreen as MainMenu;
if (menu == null) AddAssert("check if menu music loops", () => getTrack().Looping);
return false; }
return menu.Track.Looping; private Track getTrack() => (IntroStack?.CurrentScreen as MainMenu)?.Track;
});
}
} }
} }