mirror of
https://github.com/ppy/osu.git
synced 2025-03-24 16:17:23 +08:00
Ensure frames arrive
This commit is contained in:
parent
593b0a3ada
commit
400542bc0b
@ -9,6 +9,8 @@ using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Spectator;
|
||||
using osu.Game.Replays.Legacy;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Replays;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Tests.Beatmaps.IO;
|
||||
using osu.Game.Users;
|
||||
@ -38,12 +40,19 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
});
|
||||
}
|
||||
|
||||
private OsuFramedReplayInputHandler replayHandler =>
|
||||
(OsuFramedReplayInputHandler)Stack.ChildrenOfType<OsuInputManager>().First().ReplayInputHandler;
|
||||
|
||||
[Test]
|
||||
public void TestBasicSpectatingFlow()
|
||||
{
|
||||
beginSpectating();
|
||||
AddStep("start play", () => testSpectatorStreamingClient.StartPlay());
|
||||
AddStep("send frames", () => testSpectatorStreamingClient.SendFrames());
|
||||
|
||||
AddUntilStep("wait for player", () => Stack.CurrentScreen is Player);
|
||||
|
||||
AddAssert("ensure frames arrived", () => replayHandler.HasFrames);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Replays
|
||||
/// </summary>
|
||||
public bool FrameAccuratePlayback = false;
|
||||
|
||||
protected bool HasFrames => Frames.Count > 0;
|
||||
public bool HasFrames => Frames.Count > 0;
|
||||
|
||||
private bool inImportantSection
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user