summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-05-18 21:01:59 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-05-20 20:40:23 +0200
commitb64804a2d2b0e60885c315e1439e76a334513937 (patch)
treef2e3fb6fbc6b27b66605c379dc9fc79f0b4f2dce
parent213fe4786c22d88fe567f351402d09087605606e (diff)
(test) Chatroom messages
-rw-r--r--chatroom.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/chatroom.test b/chatroom.test
index ac66f38..ffb7b4d 100644
--- a/chatroom.test
+++ b/chatroom.test
@@ -73,3 +73,29 @@ test ChatroomSetup:
with p:
expect /chatroom-watched-updated [a-z0-9#]+ fourth2.*/
expect /chatroom-watched-updated [a-z0-9#]+ fifth2.*/
+
+
+test ChatroomMessages:
+ spawn as p1
+
+ send "create-identity Device1 Owner1" to p1
+
+ for p in [ p1 ]:
+ with p:
+ send "chatroom-watch-local"
+ send "start-server"
+
+ send "chatroom-create room" to p1
+ expect /chatroom-create-done ([a-z0-9#]+) room.*/ from p1 capture room
+
+ for p in [ p1 ]:
+ with p:
+ expect /chatroom-watched-added $room room/
+
+ send "chatroom-message-send $room message1" to p1
+ expect /chatroom-message-new $room from Owner1 text message1/ from p1
+
+ send "chatroom-message-send $room message2" to p1
+ local:
+ expect /chatroom-message-new $room from Owner1 text (.*)/ from p1 capture msg
+ guard (msg == "message2")