mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Ensure spectator screen is loaded before continuing
This commit is contained in:
parent
48b0357e7d
commit
5fcd39a43d
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Framework.Utils;
|
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)));
|
AddStep("load screen", () => LoadScreen(spectatorScreen = new Spectator(testSpectatorStreamingClient.StreamingUser)));
|
||||||
|
AddUntilStep("wait for screen load", () => spectatorScreen.LoadState == LoadState.Loaded);
|
||||||
|
}
|
||||||
|
|
||||||
internal class TestSpectatorStreamingClient : SpectatorStreamingClient
|
internal class TestSpectatorStreamingClient : SpectatorStreamingClient
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user