mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 04:49:40 +08:00
Merge pull request #19041 from smoogipoo/fix-music-tests
Fix intermittent MusicController tests
This commit is contained in:
commit
5454171de1
@ -24,10 +24,11 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
public void TestMusicPlayAction()
|
public void TestMusicPlayAction()
|
||||||
{
|
{
|
||||||
AddStep("ensure playing something", () => Game.MusicController.EnsurePlayingSomething());
|
AddStep("ensure playing something", () => Game.MusicController.EnsurePlayingSomething());
|
||||||
|
AddUntilStep("music playing", () => Game.MusicController.IsPlaying);
|
||||||
AddStep("toggle playback", () => globalActionContainer.TriggerPressed(GlobalAction.MusicPlay));
|
AddStep("toggle playback", () => globalActionContainer.TriggerPressed(GlobalAction.MusicPlay));
|
||||||
AddAssert("music paused", () => !Game.MusicController.IsPlaying && Game.MusicController.UserPauseRequested);
|
AddUntilStep("music paused", () => !Game.MusicController.IsPlaying && Game.MusicController.UserPauseRequested);
|
||||||
AddStep("toggle playback", () => globalActionContainer.TriggerPressed(GlobalAction.MusicPlay));
|
AddStep("toggle playback", () => globalActionContainer.TriggerPressed(GlobalAction.MusicPlay));
|
||||||
AddAssert("music resumed", () => Game.MusicController.IsPlaying && !Game.MusicController.UserPauseRequested);
|
AddUntilStep("music resumed", () => Game.MusicController.IsPlaying && !Game.MusicController.UserPauseRequested);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
Reference in New Issue
Block a user