mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Retouch chat command test slightly
This commit is contained in:
parent
c4627bed6d
commit
3467b1f60c
@ -345,17 +345,17 @@ namespace osu.Game.Tests.Visual.Online
|
||||
AddStep("Join channel 1", () => channelManager.JoinChannel(channel1));
|
||||
AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1]));
|
||||
|
||||
AddStep("Open chat with user.", () => channelManager.PostCommand("chat some body"));
|
||||
AddStep("Open chat with user", () => channelManager.PostCommand("chat some body"));
|
||||
AddAssert("PM channel is selected", () =>
|
||||
channelManager.CurrentChannel.Value.Type == ChannelType.PM && channelManager.CurrentChannel.Value.Users.Single().Username == "some body");
|
||||
|
||||
AddStep("Open chat with non-existant user", () => channelManager.PostCommand("chat nobody"));
|
||||
AddAssert("Last message is error", () => channelManager.CurrentChannel.Value.Messages.Last().GetType() == typeof(ErrorMessage));
|
||||
AddStep("Open chat with non-existent user", () => channelManager.PostCommand("chat nobody"));
|
||||
AddAssert("Last message is error", () => channelManager.CurrentChannel.Value.Messages.Last() is ErrorMessage);
|
||||
|
||||
// Make sure no unnecessary requests are made when the PM channel is already open.
|
||||
AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1]));
|
||||
AddStep("Unregister request handling", () => ((DummyAPIAccess)API).HandleRequest = null);
|
||||
AddStep("Open chat with user.", () => channelManager.PostCommand("chat some body"));
|
||||
AddStep("Open chat with user", () => channelManager.PostCommand("chat some body"));
|
||||
AddAssert("PM channel is selected", () =>
|
||||
channelManager.CurrentChannel.Value.Type == ChannelType.PM && channelManager.CurrentChannel.Value.Users.Single().Username == "some body");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user