Base wait steps duration on the delay used for results display

With `* 2` for safety of not potentially going to the next step and the delegate not executed yet.
This commit is contained in:
Salman Ahmed
2020-04-20 06:42:33 +03:00
parent 6f233917b1
commit e12e3391fb
2 changed files with 11 additions and 2 deletions

View File

@ -24,6 +24,9 @@ namespace osu.Game.Tests.Visual.Gameplay
[Resolved]
private AudioManager audio { get; set; }
private int resultsDisplayWaitCount =>
(int)((Screens.Play.Player.RESULTS_DISPLAY_DELAY / TimePerAction) * 2);
protected override bool AllowFail => false;
public TestSceneCompletionCancellation()
@ -83,7 +86,8 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("rewind to cancel", () => track.Seek(4000));
AddUntilStep("completion cleared by processor", () => !Player.ScoreProcessor.HasCompleted.Value);
AddWaitStep("wait", 5);
// wait to ensure there was no attempt of pushing the results screen.
AddWaitStep("wait", resultsDisplayWaitCount);
}
protected override WorkingBeatmap CreateWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard = null)