diff --git a/tests/ChatClient.hs b/tests/ChatClient.hs index 12a63d2333..b14f62a2e5 100644 --- a/tests/ChatClient.hs +++ b/tests/ChatClient.hs @@ -433,8 +433,8 @@ getTermLine cc@TestCC {printOutput} = 5000000 `timeout` atomically (readTQueue $ termQ cc) >>= \case Just s -> do -- remove condition to always echo virtual terminal - -- when True $ do - when printOutput $ do + when True $ do + -- when printOutput $ do name <- userName cc putStrLn $ name <> ": " <> s pure s diff --git a/tests/ChatTests/Groups.hs b/tests/ChatTests/Groups.hs index a3e298219d..1aba3a77c6 100644 --- a/tests/ChatTests/Groups.hs +++ b/tests/ChatTests/Groups.hs @@ -345,11 +345,11 @@ testGroupShared alice bob cath checkMessages = do -- test clearing chat threadDelay 1000000 alice #$> ("/clear #team", id, "#team: all messages are removed locally ONLY") - alice #$> ("/_get chat #1 count=100", chat, []) + alice #$> ("/_get chat #1 count=100", chat, [(1,"chat banner")]) bob #$> ("/clear #team", id, "#team: all messages are removed locally ONLY") - bob #$> ("/_get chat #1 count=100", chat, []) + bob #$> ("/_get chat #1 count=100", chat, [(1,"chat banner")]) cath #$> ("/clear #team", id, "#team: all messages are removed locally ONLY") - cath #$> ("/_get chat #1 count=100", chat, []) + cath #$> ("/_get chat #1 count=100", chat, [(1,"chat banner")]) where getReadChats :: HasCallStack => String -> String -> IO () getReadChats msgItem1 msgItem2 = do @@ -588,7 +588,7 @@ testGroup2 = ] dan <##> alice -- show last messages - alice ##> "/t #club 19" + alice ##> "/t #club 20" alice -- these strings are expected in any order because of sorting by time and rounding of time for sent <##? ( map (ConsoleString . ("#club " <> )) groupFeatureStrs diff --git a/tests/ChatTests/Utils.hs b/tests/ChatTests/Utils.hs index 72c0205883..5782c3381e 100644 --- a/tests/ChatTests/Utils.hs +++ b/tests/ChatTests/Utils.hs @@ -309,7 +309,7 @@ groupFeatureStrs :: [String] groupFeatureStrs = map (\(a, _, _) -> snd a) $ groupFeatures'' 0 groupFeatures'' :: Int -> [((Int, String), Maybe (Int, String), Maybe String)] -groupFeatures'' dir = ((dir, e2eeInfoNoPQStr), Nothing, Nothing) : groupFeatures_ dir +groupFeatures'' dir = ((1, "chat banner"), Nothing, Nothing) : ((dir, e2eeInfoNoPQStr), Nothing, Nothing) : groupFeatures_ dir groupFeatures_ :: Int -> [((Int, String), Maybe (Int, String), Maybe String)] groupFeatures_ dir = @@ -505,6 +505,8 @@ dropTime_ :: String -> Maybe String dropTime_ msg = case splitAt 6 msg of ([m, m', ':', s, s', ' '], text) -> if all isDigit [m, m', s, s'] then Just text else Nothing + ([month, month', '-', d, d', ' '], text) -> + if all isDigit [month, month', d, d'] then Just text else Nothing _ -> Nothing dropStrPrefix :: HasCallStack => String -> String -> String