1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 17:02:55 +08:00

Ensure beatmap is reloaded before each playlist room test run

This commit is contained in:
Dean Herbert 2021-06-24 13:29:06 +09:00
parent 1bbfbb0d8e
commit cd6f175375

View File

@ -40,8 +40,6 @@ namespace osu.Game.Tests.Visual.Playlists
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory)); Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default)); Dependencies.Cache(manager = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
manager.Import(new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo.BeatmapSet).Wait();
((DummyAPIAccess)API).HandleRequest = req => ((DummyAPIAccess)API).HandleRequest = req =>
{ {
switch (req) switch (req)
@ -58,6 +56,7 @@ namespace osu.Game.Tests.Visual.Playlists
[SetUpSteps] [SetUpSteps]
public void SetupSteps() public void SetupSteps()
{ {
AddStep("ensure has beatmap", () => manager.Import(new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo.BeatmapSet).Wait());
AddStep("load match", () => LoadScreen(match = new TestPlaylistsRoomSubScreen(Room))); AddStep("load match", () => LoadScreen(match = new TestPlaylistsRoomSubScreen(Room)));
AddUntilStep("wait for load", () => match.IsCurrentScreen()); AddUntilStep("wait for load", () => match.IsCurrentScreen());
} }