1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Fix tests not running more than once

This commit is contained in:
Dean Herbert 2019-02-19 14:28:53 +09:00
parent 39b203375f
commit 5f792fbacc

View File

@ -317,6 +317,8 @@ namespace osu.Game.Rulesets.Osu.Tests
// Likely requires some discussion regarding how first frame inputs should be handled.
frames.Insert(0, new OsuReplayFrame());
AddStep("load player", () =>
{
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } })
{
AllowPause = false,
@ -336,13 +338,11 @@ namespace osu.Game.Rulesets.Osu.Tests
};
};
AddStep("load player", () =>
{
LoadScreen(currentPlayer = p);
allJudgedFired = false;
judgementResults = new List<JudgementResult>();
});
AddUntilStep(() => p.IsLoaded, "Wait until player is loaded");
AddUntilStep(() => currentPlayer.IsLoaded, "Wait until player is loaded");
AddUntilStep(() => allJudgedFired, "Wait for all judged");
}