summaryrefslogtreecommitdiff
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
commit779c2e5d7b04abaf78b9919ab9a087e4a6969736 (patch)
treec540b55e51bac7023f42c01e94323c3df4764172
parent56777e9ced16adaa38bc1e2e5228acc656a73cd2 (diff)
(test) Message: send messages as sync from shared state
-rw-r--r--message.test29
1 files changed, 25 insertions, 4 deletions
diff --git a/message.test b/message.test
index e317116..f630c59 100644
--- a/message.test
+++ b/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