Add too many messages to better test long scrolls

This commit is contained in:
Salman Ahmed 2022-03-10 04:01:07 +03:00
parent b25c37ce62
commit f229447453
1 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,7 @@ public void TestMessageHighlightingOnFilledChat()
{ {
int index = 0; int index = 0;
fillChat(); fillChat(100);
AddStep("highlight first message", () => testChannel.HighlightedMessage.Value = testChannel.Messages[index = 0]); AddStep("highlight first message", () => testChannel.HighlightedMessage.Value = testChannel.Messages[index = 0]);
AddStep("highlight next message", () => testChannel.HighlightedMessage.Value = testChannel.Messages[index = Math.Min(index + 1, testChannel.Messages.Count - 1)]); AddStep("highlight next message", () => testChannel.HighlightedMessage.Value = testChannel.Messages[index = Math.Min(index + 1, testChannel.Messages.Count - 1)]);
@ -304,11 +304,11 @@ public void TestLocalEchoMessageResetsScroll()
checkScrolledToBottom(); checkScrolledToBottom();
} }
private void fillChat() private void fillChat(int count = 10)
{ {
AddStep("fill chat", () => AddStep("fill chat", () =>
{ {
for (int i = 0; i < 10; i++) for (int i = 0; i < count; i++)
{ {
testChannel.AddNewMessages(new Message(messageIdSequence++) testChannel.AddNewMessages(new Message(messageIdSequence++)
{ {