This commit is contained in:
Evgeny @ SimpleX Chat committed 2026-10-20 21:10:12 +00:00
1 parent 8f90d77e30
commit c0c652486f
2 files changed
+4 -12

No files matched your search

+3 -11
View File
@@ -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' <message> 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' <message> 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"
+1 -1
View File
@@ -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 =