1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Ensure spectator screen is loaded before continuing

This commit is contained in:
Dean Herbert 2020-10-28 16:29:06 +09:00
parent 48b0357e7d
commit 5fcd39a43d

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Framework.Utils;
@ -170,8 +171,11 @@ namespace osu.Game.Tests.Visual.Gameplay
});
}
private void loadSpectatingScreen() =>
private void loadSpectatingScreen()
{
AddStep("load screen", () => LoadScreen(spectatorScreen = new Spectator(testSpectatorStreamingClient.StreamingUser)));
AddUntilStep("wait for screen load", () => spectatorScreen.LoadState == LoadState.Loaded);
}
internal class TestSpectatorStreamingClient : SpectatorStreamingClient
{