mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Add test for menu playing music on return
This commit is contained in:
parent
1760cc2427
commit
cb56b8e031
@ -6,6 +6,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Mods;
|
||||
@ -70,6 +71,23 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddAssert("Ensure time wasn't reset to preview point", () => track().CurrentTime < beatmap().Metadata.PreviewTime);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMenuMakesMusic()
|
||||
{
|
||||
WorkingBeatmap beatmap() => Game.Beatmap.Value;
|
||||
Track track() => beatmap().Track;
|
||||
|
||||
TestSongSelect songSelect = null;
|
||||
|
||||
PushAndConfirm(() => songSelect = new TestSongSelect());
|
||||
|
||||
AddUntilStep("wait for no track", () => track() is TrackVirtual);
|
||||
|
||||
AddStep("return to menu", () => songSelect.Exit());
|
||||
|
||||
AddUntilStep("wait for track", () => !(track() is TrackVirtual) && track().IsRunning);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExitSongSelectWithClick()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user