From af56d96a6a4e7fb01aa87b8ed89c22c36c70f64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mion?= Date: Tue, 28 Jul 2026 16:42:31 +0100 Subject: [PATCH] e2e: Wait for the message delivery before the participant reads it The send is asynchronous after the composer tap, so the participant's read request could reach the mock server before the message it should mark as read, leaving the message unread and the double checkmark never shown. Same fix as for the participant pin. Second-precision mock timestamps used to hide the wrong order as a tie; with real sub-second precision the order is exposed. --- .../compose/tests/MessageDeliveryStatusTests.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt b/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt index d85d724e351..5ca8503f672 100644 --- a/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt +++ b/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt @@ -199,6 +199,9 @@ class MessageDeliveryStatusTests : StreamTestCase() { step("WHEN user replies to message in thread") { userRobot.openThread().sendMessage(sampleText) } + step("AND the thread reply is delivered") { + userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.SENT) + } step("AND participant reads the user's thread reply") { participantRobot.readMessage() } @@ -347,6 +350,9 @@ class MessageDeliveryStatusTests : StreamTestCase() { step("AND user sends a new message") { userRobot.sendMessage(sampleText) } + step("AND the message is delivered") { + userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.SENT) + } step("WHEN user returns to the channel list") { userRobot.moveToChannelListFromMessageList() } @@ -469,6 +475,9 @@ class MessageDeliveryStatusTests : StreamTestCase() { step("AND user sends a new message") { userRobot.sendMessage(sampleText) } + step("AND the message is delivered") { + userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.SENT) + } step("AND participant reads the message") { participantRobot.readMessage() userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.READ) @@ -491,6 +500,9 @@ class MessageDeliveryStatusTests : StreamTestCase() { step("AND user replies to message in thread") { userRobot.openThread().sendMessage(sampleText) } + step("AND the thread reply is delivered") { + userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.SENT) + } step("AND participant reads the thread reply") { participantRobot.readMessage() userRobot.assertMessageDeliveryStatus(MessageDeliveryStatus.READ)