mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 05:22:54 +08:00
Add missing async safeties to new tests
This commit is contained in:
parent
4630aa15cc
commit
2c4a6c2465
@ -424,7 +424,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddUntilStep("Beatmap doesn't match current item", () => Beatmap.Value.BeatmapInfo.OnlineID != multiplayerClient.Room?.Playlist.First().BeatmapID);
|
||||
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch());
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch().WaitSafely());
|
||||
|
||||
AddUntilStep("play started", () => multiplayerComponents.CurrentScreen is Player);
|
||||
|
||||
@ -462,7 +462,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddUntilStep("Ruleset doesn't match current item", () => Ruleset.Value.OnlineID != multiplayerClient.Room?.Playlist.First().RulesetID);
|
||||
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch());
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch().WaitSafely());
|
||||
|
||||
AddUntilStep("play started", () => multiplayerComponents.CurrentScreen is Player);
|
||||
|
||||
@ -500,7 +500,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddAssert("Mods don't match current item", () => !SelectedMods.Value.Select(m => m.Acronym).SequenceEqual(multiplayerClient.Room.AsNonNull().Playlist.First().RequiredMods.Select(m => m.Acronym)));
|
||||
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch());
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch().WaitSafely());
|
||||
|
||||
AddUntilStep("play started", () => multiplayerComponents.CurrentScreen is Player);
|
||||
|
||||
@ -535,7 +535,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddUntilStep("wait for spectating user state", () => multiplayerClient.LocalUser?.State == MultiplayerUserState.Spectating);
|
||||
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch());
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch().WaitSafely());
|
||||
|
||||
AddAssert("play not started", () => multiplayerComponents.IsCurrentScreen());
|
||||
}
|
||||
@ -568,7 +568,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddUntilStep("wait for spectating user state", () => multiplayerClient.LocalUser?.State == MultiplayerUserState.Spectating);
|
||||
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch());
|
||||
AddStep("start match externally", () => multiplayerClient.StartMatch().WaitSafely());
|
||||
|
||||
AddStep("restore beatmap", () =>
|
||||
{
|
||||
@ -883,7 +883,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("start match by other user", () =>
|
||||
{
|
||||
multiplayerClient.ChangeUserState(1234, MultiplayerUserState.Ready);
|
||||
multiplayerClient.StartMatch();
|
||||
multiplayerClient.StartMatch().WaitSafely();
|
||||
});
|
||||
|
||||
AddUntilStep("wait for loading", () => multiplayerClient.Room?.State == MultiplayerRoomState.WaitingForLoad);
|
||||
|
@ -117,7 +117,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
MultiplayerClient.TransferHost(2);
|
||||
});
|
||||
|
||||
AddStep("start with countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(2) }));
|
||||
AddStep("start with countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(2) }).WaitSafely());
|
||||
|
||||
ClickButtonWhenEnabled<MultiplayerReadyButton.ReadyButton>();
|
||||
AddUntilStep("user is ready", () => MultiplayerClient.Room?.Users[0].State == MultiplayerUserState.Ready);
|
||||
@ -193,7 +193,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
MultiplayerClient.TransferHost(2);
|
||||
});
|
||||
|
||||
AddStep("start countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(1) }));
|
||||
AddStep("start countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(1) }).WaitSafely());
|
||||
AddUntilStep("countdown started", () => MultiplayerClient.Room?.Countdown != null);
|
||||
|
||||
AddStep("transfer host to local user", () => MultiplayerClient.TransferHost(API.LocalUser.Value.OnlineID));
|
||||
|
Loading…
Reference in New Issue
Block a user