1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Add visual test for rewinding

This commit is contained in:
Christine Chen 2021-05-04 22:23:36 -04:00
parent 1472960319
commit 1d4a8bc0ae

View File

@ -116,6 +116,15 @@ namespace osu.Game.Tests.Visual.Gameplay
AddUntilStep("wait for score shown", () => Player.IsScoreShown);
}
[Test]
public void TestStoryboardRewind()
{
CreateTest(null);
AddUntilStep("completion set by processor", () => Player.ScoreProcessor.HasCompleted.Value);
AddStep("rewind", () => Player.GameplayClockContainer.Seek(-1000));
AddUntilStep("storyboard ends", () => Player.GameplayClockContainer.GameplayClock.CurrentTime >= currentStoryboardDuration);
}
protected override bool AllowFail => true;
protected override Ruleset CreatePlayerRuleset() => new OsuRuleset();