summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-01-07 20:38:51 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-01-08 22:15:21 +0100
commit56b6a56b5d14781cd24e38860c082bfdab96c918 (patch)
treefa8fc33960d19d8ef2bdce57db6f6697f70c8dc3 /test
parent6e6836e7885259b731651ae172bd6313edae7cdd (diff)
Message: send messages as sync from shared state
Diffstat (limited to 'test')
-rw-r--r--test/message.test29
1 files changed, 25 insertions, 4 deletions
diff --git a/test/message.test b/test/message.test
index e317116..f630c59 100644
--- a/test/message.test
+++ b/test/message.test
@@ -88,11 +88,17 @@ test DirectMessage:
# Reload message history
- with p1:
- send "stop-server"
- expect /stop-server-done/
- send "start-server"
+ for p in [p1, p2]:
+ with p:
+ send "stop-server"
+ for p in [p1, p2]:
+ with p:
+ expect /stop-server-done/
+ for p in [p1, p2]:
+ with p:
+ send "start-server"
+ with p1:
send "contact-list"
expect:
/contact-list-item $c1_2 Owner2 Owner2/
@@ -111,3 +117,18 @@ test DirectMessage:
expect /dm-list-item from Owner2 text hi$i/
expect /dm-list-(.*)/ capture done
guard (done == "done")
+
+ # Send message while offline
+
+ for p in [p1, p2]:
+ with p:
+ send "stop-server"
+ for p in [p1, p2]:
+ with p:
+ expect /stop-server-done/
+ send "start-server" to p2
+
+ send "dm-send-contact $c1_2 while_offline" to p1
+ send "start-server" to p1
+
+ expect /dm-received from Owner1 text while_offline/ from p2