test: Add golden test for Alice's side, too, in test_sync_broadcast

This commit is contained in:
Hocuri
2025-09-01 08:15:37 +02:00
parent 019da70c8a
commit 0c25646ac2
2 changed files with 17 additions and 5 deletions

View File

@@ -4110,16 +4110,22 @@ async fn test_sync_broadcast() -> Result<()> {
let bob_chat = Chat::load_from_db(bob, bob_broadcast_id).await?;
assert!(!bob_chat.is_self_in_chat(bob).await?);
bob.golden_test_chat(bob_broadcast_id, "test_sync_broadcast_bob")
.await;
// Alice1 and Alice2 are supposed to show the chat in the same way:
alice1
.golden_test_chat(a1_broadcast_id, "test_sync_broadcast_alice")
.await;
alice2
.golden_test_chat(a2_broadcast_id, "test_sync_broadcast_alice")
.await;
tcm.section("Alice's first device deletes the chat");
a1_broadcast_id.delete(alice1).await?;
sync(alice1, alice2).await;
alice2.assert_no_chat(a2_broadcast_id).await;
// TODO test if Alice's second device shows duplicate member-added messages
bob.golden_test_chat(bob_broadcast_id, "test_sync_broadcast_bob")
.await;
Ok(())
}

View File

@@ -0,0 +1,6 @@
OutBroadcast#Chat#10: Channel [0 member(s)]
--------------------------------------------------------------------------------
Msg#13🔒: Me (Contact#Contact#Self): Member bob@example.net added. [INFO] √
Msg#15🔒: Me (Contact#Contact#Self): hi √
Msg#16🔒: Me (Contact#Contact#Self): You removed member bob@example.net. [INFO] √
--------------------------------------------------------------------------------