Simplify input buttons/keys in tests

This commit is contained in:
Joehu
2020-11-05 06:41:56 -08:00
parent d7c30f9b42
commit ef3c918a3c
14 changed files with 46 additions and 113 deletions

View File

@ -103,11 +103,7 @@ namespace osu.Game.Tests.Visual.Online
public void TestChannelShortcutKeys()
{
AddStep("Join channels", () => channels.ForEach(channel => channelManager.JoinChannel(channel)));
AddStep("Close channel selector", () =>
{
InputManager.PressKey(Key.Escape);
InputManager.ReleaseKey(Key.Escape);
});
AddStep("Close channel selector", () => InputManager.Key(Key.Escape));
AddUntilStep("Wait for close", () => chatOverlay.SelectionOverlayState == Visibility.Hidden);
for (int zeroBasedIndex = 0; zeroBasedIndex < 10; ++zeroBasedIndex)
@ -216,9 +212,8 @@ namespace osu.Game.Tests.Visual.Online
{
var channelKey = Key.Number0 + number;
InputManager.PressKey(Key.AltLeft);
InputManager.PressKey(channelKey);
InputManager.Key(channelKey);
InputManager.ReleaseKey(Key.AltLeft);
InputManager.ReleaseKey(channelKey);
}
private void clickDrawable(Drawable d)