From c9896cec0030bdeaecad176e2a3d9212923b3f8c Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 5 Apr 2024 20:32:53 +0400 Subject: [PATCH] more tests --- tests/ChatTests/Forward.hs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/ChatTests/Forward.hs b/tests/ChatTests/Forward.hs index 5a6bc533e7..57b38354df 100644 --- a/tests/ChatTests/Forward.hs +++ b/tests/ChatTests/Forward.hs @@ -21,6 +21,7 @@ chatForwardTests = do it "from notes to contact" testForwardNotesToContact it "from notes to group" testForwardNotesToGroup it "from notes to notes" testForwardNotesToNotes -- TODO forward between different folders when supported + it "preserve original forward info" testForwardPreserveInfo describe "forward files" $ do it "from contact to contact" testForwardFileNoFilesFolder it "with relative paths: from contact to contact" testForwardFileContactToContact @@ -217,6 +218,34 @@ testForwardNotesToNotes tmp = alice <# "* hi" alice <# "* hi" +testForwardPreserveInfo :: HasCallStack => FilePath -> IO () +testForwardPreserveInfo = + testChat4 aliceProfile bobProfile cathProfile danProfile $ + \alice bob cath dan -> do + createCCNoteFolder alice + connectUsers alice bob + connectUsers alice cath + createGroup2 "team" alice dan + + bob #> "@alice hey" + alice <# "bob> hey" + + alice `send` "> @bob -> * hey" + alice <# "* -> from bob (contact id: 2)" + alice <## " hey" + + alice `send` "> * -> @cath hey" + alice <# "@cath -> from bob (contact id: 2)" + alice <## " hey" + cath <# "alice> -> forwarded" + cath <## " hey" + + alice `send` ">> @cath -> #team hey" + alice <# "#team -> from bob (contact id: 2)" + alice <## " hey" + dan <# "#team alice> -> forwarded" + dan <## " hey" + testForwardFileNoFilesFolder :: HasCallStack => FilePath -> IO () testForwardFileNoFilesFolder = testChat3 aliceProfile bobProfile cathProfile $