chore: add group messages delivery regression test

part of: status-im/status-desktop#8263
This commit is contained in:
Patryk Osmaczko 2022-11-17 19:11:07 +01:00 committed by osmaczko
parent 1036243276
commit 22fc10c248
1 changed files with 14 additions and 0 deletions

View File

@ -330,6 +330,20 @@ func (s *MessengerGroupChatSuite) TestGroupChatEdit() {
s.Require().Equal("test_member_group", response.Chats()[0].Name)
s.Require().Equal("#F0F0F0", response.Chats()[0].Color)
inputMessage := buildTestMessage(*groupChat)
_, err = admin.SendChatMessage(context.Background(), inputMessage)
s.Require().NoError(err)
response, err = WaitOnMessengerResponse(
member,
func(r *MessengerResponse) bool { return len(r.Messages()) > 0 },
"chat invitation not received",
)
s.Require().NoError(err)
s.Require().Len(response.Messages(), 1)
s.Require().Equal(inputMessage.Text, response.Messages()[0].Text)
defer s.NoError(admin.Shutdown())
defer s.NoError(member.Shutdown())
}