diff --git a/tests/Bots/DirectoryTests.hs b/tests/Bots/DirectoryTests.hs index f15a419c31..c33d9df230 100644 --- a/tests/Bots/DirectoryTests.hs +++ b/tests/Bots/DirectoryTests.hs @@ -16,7 +16,6 @@ import Control.Concurrent.STM (atomically, peekTQueue, tryReadTMVar) import Control.Exception (finally) import Control.Monad (forM_, replicateM, when, void) import qualified Data.Aeson as J -import Data.List (partition) import qualified Data.Text as T import Directory.Captcha import Directory.Listing @@ -422,16 +421,9 @@ testJoinGroup ps = cath <## "connection request sent!" cath <## "#privacy: joining the group..." cath <## "#privacy: you joined the group, pending approval" - let mergedLines = - [ "contact and member are merged: 'SimpleX Directory', #privacy 'SimpleX Directory_1'", - "use @'SimpleX Directory' to send messages" - ] - directoryMsg = T.unpack . T.replace "'SimpleX Directory_1'> " "'SimpleX Directory'> " . T.pack . dropTime - (merged, captchaLines) <- partition (`elem` mergedLines) <$> replicateM 6 (getTermLine cath) - merged `shouldBe` mergedLines - [intro, "", "Send captcha text to join the group privacy.", captchaLine] <- pure captchaLines - directoryMsg intro `shouldBe` "#privacy (support) 'SimpleX Directory'> Captcha is generated by SimpleX Directory service." - let captcha = dropStrPrefix "#privacy (support) 'SimpleX Directory'> " $ directoryMsg captchaLine + let merged = ["contact and member are merged: 'SimpleX Directory', #privacy 'SimpleX Directory_1'", "use @'SimpleX Directory' to send messages"] + [_, "", "Send captcha text to join the group privacy.", captchaLine] <- filter (`notElem` merged) <$> replicateM 6 (getTermLine cath) + let captcha = drop 2 $ dropWhile (/= '>') captchaLine cath #> ("#privacy (support) " <> captcha) cath <# ("#privacy (support) 'SimpleX Directory'!> > cath " <> captcha) cath <## " Correct, you joined the group privacy" diff --git a/tests/ChatTests/ChatRelays.hs b/tests/ChatTests/ChatRelays.hs index baf8d10d16..7923a6546b 100644 --- a/tests/ChatTests/ChatRelays.hs +++ b/tests/ChatTests/ChatRelays.hs @@ -221,7 +221,7 @@ testChatRelayTest ps = bob <## "Your chat address is deleted - accepted contacts will remain connected." bob <## "To create a new chat address use /ad" alice ##> ("/relay test " <> bobSLink) - alice <##. "relay test failed at RTSGetLink, error: " + alice <##.. ["relay test failed at RTSGetLink, error: ", "relay test failed at RTSConnect, error: "] testRelayProfileUpdateInAddress :: HasCallStack => TestParams -> IO () testRelayProfileUpdateInAddress ps =