diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-18 21:01:59 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-20 20:40:23 +0200 |
commit | b64804a2d2b0e60885c315e1439e76a334513937 (patch) | |
tree | f2e3fb6fbc6b27b66605c379dc9fc79f0b4f2dce /chatroom.test | |
parent | 213fe4786c22d88fe567f351402d09087605606e (diff) |
(test) Chatroom messages
Diffstat (limited to 'chatroom.test')
-rw-r--r-- | chatroom.test | 26 |
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") |