From b64804a2d2b0e60885c315e1439e76a334513937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 18 May 2024 21:01:59 +0200 Subject: (test) Chatroom messages --- chatroom.test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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") -- cgit v1.2.3