1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Add quick test coverage

This commit is contained in:
Salman Ahmed 2022-04-08 19:21:37 +03:00
parent 57fb8616b8
commit 34adc1d410

View File

@ -534,11 +534,33 @@ namespace osu.Game.Tests.Visual.Online
});
});
AddStep("Highlight message and open chat", () =>
AddStep("Highlight message", () => chatOverlay.HighlightMessage(message, channel1));
}
[Test]
public void TestHighlightWithNullChannel()
{
Message message = null;
AddStep("Join channel 1", () => channelManager.JoinChannel(channel1));
AddStep("Send message in channel 1", () =>
{
chatOverlay.HighlightMessage(message, channel1);
chatOverlay.Show();
channel1.AddNewMessages(message = new Message
{
ChannelId = channel1.Id,
Content = "Message to highlight!",
Timestamp = DateTimeOffset.Now,
Sender = new APIUser
{
Id = 2,
Username = "Someone",
}
});
});
AddStep("Set null channel", () => channelManager.CurrentChannel.Value = null);
AddStep("Highlight message", () => chatOverlay.HighlightMessage(message, channel1));
}
private void pressChannelHotkey(int number)