Fix sample playback test

This commit is contained in:
smoogipoo 2020-11-13 18:35:33 +09:00
parent 832d52a056
commit feabca860b
1 changed files with 5 additions and 3 deletions

View File

@ -23,11 +23,13 @@ public void TestAllSamplesStopDuringSeek()
DrawableSample[] samples = null;
ISamplePlaybackDisabler sampleDisabler = null;
AddStep("get variables", () =>
AddUntilStep("get variables", () =>
{
sampleDisabler = Player;
slider = Player.ChildrenOfType<DrawableSlider>().OrderBy(s => s.HitObject.StartTime).First();
samples = slider.ChildrenOfType<DrawableSample>().ToArray();
slider = Player.ChildrenOfType<DrawableSlider>().OrderBy(s => s.HitObject.StartTime).FirstOrDefault();
samples = slider?.ChildrenOfType<DrawableSample>().ToArray();
return slider != null;
});
AddUntilStep("wait for slider sliding then seek", () =>