mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:53:00 +08:00
Add test coverage of keyboard room creation flow
This commit is contained in:
parent
063868713e
commit
3c7a49f431
@ -8,6 +8,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
@ -88,6 +89,28 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
// used to test the flow of multiplayer from visual tests.
|
// used to test the flow of multiplayer from visual tests.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestCreateRoomViaKeyboard()
|
||||||
|
{
|
||||||
|
// create room dialog
|
||||||
|
AddStep("Press new document", () => InputManager.Keys(PlatformAction.DocumentNew));
|
||||||
|
AddUntilStep("wait for settings", () => InputManager.ChildrenOfType<MultiplayerMatchSettingsOverlay>().FirstOrDefault() != null);
|
||||||
|
|
||||||
|
// edit playlist item
|
||||||
|
AddStep("Press select", () => InputManager.Key(Key.Enter));
|
||||||
|
AddUntilStep("wait for song select", () => InputManager.ChildrenOfType<MultiplayerMatchSongSelect>().FirstOrDefault() != null);
|
||||||
|
|
||||||
|
// select beatmap
|
||||||
|
AddStep("Press select", () => InputManager.Key(Key.Enter));
|
||||||
|
AddUntilStep("wait for return to screen", () => InputManager.ChildrenOfType<MultiplayerMatchSongSelect>().FirstOrDefault() == null);
|
||||||
|
|
||||||
|
// create room
|
||||||
|
AddStep("Press select", () => InputManager.Key(Key.Enter));
|
||||||
|
|
||||||
|
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||||
|
AddUntilStep("wait for join", () => client.Room != null);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestCreateRoomWithoutPassword()
|
public void TestCreateRoomWithoutPassword()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user