e2e: Cover the Compose features supported by the current mock server - #6591
Conversation
- Point messageList and recordAudioButton at the tags that exist in the SDK (Stream_Messages, Stream_ComposerRecordAudioButton) - Make createChannelButton a selector instead of a raw string - Remove selectors whose tags exist nowhere (systemMessage, attachment picker sendButton, fileDownloadButton, initialsAvatar, MembersList) - Remove the unused MembersList sample composable that defined the Stream_MembersList tag
A ModalBottomSheet renders in its own window, so an app-level testTagsAsResourceId does not reach the sheet content. Re-enable it on the shared sheet wrappers, like the message actions overlay already does for its dialog window.
The tests are ignored until the mock server maintains per-user read state (AND-1329); without it the client never renders either component.
|
@CodeRabbit review |
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
✅ Action performedReview finished.
|
SDK Size Comparison 📏
|
WalkthroughCompose E2E support now covers channel menus, message actions, reactions, pinned messages, and unread indicators through updated selectors, robot helpers, assertions, and test suites. Bottom sheets expose test-tag resource IDs for UI Automator access. ChangesCompose E2E interaction coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant E2ETest
participant UserRobot
participant UiAutomator
participant ComposeUI
E2ETest->>UserRobot: request channel or message action
UserRobot->>UiAutomator: locate selector and perform gesture
UiAutomator->>ComposeUI: interact with tagged Compose element
ComposeUI-->>UiAutomator: expose updated UI state
UiAutomator-->>UserRobot: return visible elements
UserRobot-->>E2ETest: validate expected state
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt`:
- Around line 406-408: Update UserRobot.assertReactionAuthor to scope the name
lookup to the reaction-authors sheet and its item/content selector instead of
searching the entire UI. Assert that the provided name is displayed within that
sheet, while preserving the existing fluent return of this.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d882d869-eee4-49f5-998f-979506830ef0
📒 Files selected for processing (12)
stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/pages/ChannelListPage.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/pages/MessageListPage.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobot.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotChannelListAsserts.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/ChannelActionsTests.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageActionsTests.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/PinnedMessagesTests.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/ReactionsTests.ktstream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/UnreadMessagesTests.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/MembersList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/StreamModalBottomSheet.kt
💤 Files with no reviewable changes (1)
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/MembersList.kt
The send is asynchronous after the composer tap, so on a slow emulator the participant's pin request could reach the mock server before the message it targets.
…ompose-features-supported-by-the
…ompose-features-supported-by-the
…ompose-features-supported-by-the
…ompose-features-supported-by-the
|
|
🚀 Available in v7.7.0 |



Goal
Add the first e2e coverage for the Compose features that need no new mock server endpoints: pinned messages, the copy message action, the extended reactions picker, the reaction authors sheet, and the channel actions sheet with its View info navigation. Also lay the groundwork the rest of the coverage initiative needs: correct page object selectors, and test tags that reach inside bottom sheets.
Resolves AND-1328
Implementation
PinnedMessagesTests(pin and unpin, by the user and by the participant),MessageActionsTests(copy to clipboard),ReactionsTestsadditions (extended picker add and remove, reaction authors sheet), andChannelActionsTests(sheet via long-press, sheet via swipe plus the More action, and View info navigation to the group info screen).UnreadMessagesTestsis added but@Ignored against AND-1329: the mock server keeps no per-user read state, so the client never renders the unread separator or the jump-to-unread button. The tests re-enable together with the mock read-state support.testTagsAsResourceId. AModalBottomSheetrenders in its own window, so the app-level flag never reached sheet content and no sheet tag was visible to UiAutomator. The touched components are internal (no API change), and the message actions overlay already does the same for its dialog window.Stream_Messages,Stream_ComposerRecordAudioButton,Stream_CreateChannelIcon) or removed, together with the unusedMembersListsample composable.Testing
Ran locally against the mock server (API 35 emulator) via direct instrumentation:
PinnedMessagesTests: 4/4MessageActionsTests: 1/1ReactionsTests: 13/13 (10 existing plus 3 new)ChannelActionsTests: 3/3ChannelListTests: 12/12 (regression for the page object changes)Repo-wide
spotlessApply(no changes),detekt, andapiCheckpass, and the compose module unit tests pass.Summary by CodeRabbit
New Features
Tests