From b31b5af45d200b147d34cde06bdc2940c24db457 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:58:15 +0400 Subject: [PATCH] fix tests --- tests/ChatTests/Direct.hs | 1 + tests/ChatTests/Groups.hs | 3 +++ tests/ChatTests/Profiles.hs | 11 +++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ChatTests/Direct.hs b/tests/ChatTests/Direct.hs index 4b0389ab90..29d7afb9f0 100644 --- a/tests/ChatTests/Direct.hs +++ b/tests/ChatTests/Direct.hs @@ -371,6 +371,7 @@ testDeleteUnusedContactSilent = cath <### ["alice (Alice)", "bob (Bob)"] cath `hasContactProfiles` ["cath", "alice", "bob"] -- bob deletes cath, cath's bob contact is deleted silently + threadDelay 50000 bob ##> "/d cath" bob <## "cath: contact is deleted" bob ##> "/contacts" diff --git a/tests/ChatTests/Groups.hs b/tests/ChatTests/Groups.hs index d1b9fa70cb..411c4e27c8 100644 --- a/tests/ChatTests/Groups.hs +++ b/tests/ChatTests/Groups.hs @@ -608,6 +608,7 @@ testGroupDelete = testChatCfg3 cfg aliceProfile bobProfile cathProfile $ \alice bob cath -> do createGroup3 "team" alice bob cath + threadDelay 50000 alice ##> "/d #team" concurrentlyN_ [ alice <## "#team: you deleted the group", @@ -2632,6 +2633,8 @@ testPlanGroupLinkLeaveRejoin = bob <## "group link: known group #team" bob <## "use #team to send messages" + threadDelay 50000 + bob ##> "/leave #team" concurrentlyN_ [ do diff --git a/tests/ChatTests/Profiles.hs b/tests/ChatTests/Profiles.hs index 7996fde3ad..afc5ededff 100644 --- a/tests/ChatTests/Profiles.hs +++ b/tests/ChatTests/Profiles.hs @@ -179,10 +179,12 @@ testMultiWordProfileNames = alice <# "#'Our Team' 'Bob James'> hi" cath <# "#'Our Team' 'Bob James'> hi" alice `send` "@'Cath Johnson' hello" - alice <## "member #'Our Team' 'Cath Johnson' does not have direct connection, creating" - alice <## "contact for member #'Our Team' 'Cath Johnson' is created" - alice <## "sent invitation to connect directly to member #'Our Team' 'Cath Johnson'" - alice <# "@'Cath Johnson' hello" + alice + <### [ "member #'Our Team' 'Cath Johnson' does not have direct connection, creating", + "contact for member #'Our Team' 'Cath Johnson' is created", + "sent invitation to connect directly to member #'Our Team' 'Cath Johnson'", + WithTime "@'Cath Johnson' hello" + ] cath <## "#'Our Team' 'Alice Jones' is creating direct contact 'Alice Jones' with you" cath <# "'Alice Jones'> hello" cath <## "'Alice Jones': contact is connected" @@ -642,6 +644,7 @@ testPlanAddressOwn tmp = "alice_2 (Alice): contact is connected" ] + threadDelay 50000 alice @@@ [("@alice_1", lastChatFeature), ("@alice_2", lastChatFeature)] alice `send` "@alice_2 hi" alice