Skip to content

e2e: Cover the Compose features supported by the current mock server - #6591

Merged
andremion merged 14 commits into
developfrom
andrerego/and-1328-e2e-coverage-for-the-compose-features-supported-by-the
Jul 28, 2026
Merged

e2e: Cover the Compose features supported by the current mock server#6591
andremion merged 14 commits into
developfrom
andrerego/and-1328-e2e-coverage-for-the-compose-features-supported-by-the

Conversation

@andremion

@andremion andremion commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

  • New tests: PinnedMessagesTests (pin and unpin, by the user and by the participant), MessageActionsTests (copy to clipboard), ReactionsTests additions (extended picker add and remove, reaction authors sheet), and ChannelActionsTests (sheet via long-press, sheet via swipe plus the More action, and View info navigation to the group info screen).
  • UnreadMessagesTests is 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.
  • SDK change: the shared bottom sheet wrappers re-enable testTagsAsResourceId. A ModalBottomSheet renders 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.
  • Page object cleanup: selectors pointing at tags that do not exist in the SDK were corrected (Stream_Messages, Stream_ComposerRecordAudioButton, Stream_CreateChannelIcon) or removed, together with the unused MembersList sample composable.
  • Every test binds an Allure TestOps case id: the existing manual case 5953 (pin message) converts to automated, and ids 11383-11385, 11418, and 11451-11459 were created for the new scenarios.
  • The pin tests needed two mock server fixes, already merged: Apply unpin partial updates and stamp participant message events with the current created_at stream-chat-test-mock-server#52.

Testing

Ran locally against the mock server (API 35 emulator) via direct instrumentation:

  • PinnedMessagesTests: 4/4
  • MessageActionsTests: 1/1
  • ReactionsTests: 13/13 (10 existing plus 3 new)
  • ChannelActionsTests: 3/3
  • ChannelListTests: 12/12 (regression for the page object changes)

Repo-wide spotlessApply (no changes), detekt, and apiCheck pass, and the compose module unit tests pass.

Summary by CodeRabbit

  • New Features

    • Added channel actions for opening menus, viewing channel information, and managing group channels.
    • Added message actions for copying and pinning or unpinning messages.
    • Added extended reaction interactions and reaction author visibility.
    • Added unread-message navigation and dismissal controls.
  • Tests

    • Expanded end-to-end coverage for channel actions, message actions, pinned messages, reactions, and unread states.
    • Improved UI test access to bottom-sheet controls.

- 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.
@andremion andremion added the pr:test Test-only changes label Jul 27, 2026
@andremion

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@github-actions

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.95 MB 5.95 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.22 MB 11.22 MB 0.00 MB 🟢
stream-chat-android-compose 12.70 MB 12.70 MB 0.00 MB 🟢

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Compose 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.

Changes

Compose E2E interaction coverage

Layer / File(s) Summary
Bottom-sheet test semantics
stream-chat-android-compose/src/main/.../StreamModalBottomSheet.kt
Both modal bottom-sheet variants enable test tags as resource IDs.
Page-object selector contracts
stream-chat-android-compose-sample/src/androidTestE2eDebug/.../pages/*
Channel and message selectors are updated for current resource IDs, swipe actions, channel menus, unread controls, and extended reactions. Obsolete selectors are removed.
Robot actions and assertions
stream-chat-android-compose-sample/src/androidTestE2eDebug/.../robots/*
Robot actions and assertions are added for channel menus, message copying and pinning, reactions, unread indicators, and pinned labels.
End-to-end interaction scenarios
stream-chat-android-compose-sample/src/androidTestE2eDebug/.../tests/*
New tests cover channel actions, copying messages, pinning, reactions, and unread-message behavior. Unread-message tests are ignored.
Members list cleanup
stream-chat-android-compose-sample/src/main/.../MembersList.kt
The obsolete MembersList composable is removed.

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
Loading

Possibly related PRs

Suggested labels: pr:test

Suggested reviewers: gpunto, velikovpetar

Poem

I’m a rabbit with tests in a row,
Through menus and messages I hop as I go.
Reactions, pins, unread signs—
All neatly checked by carrot-white lines.
Compose tags sparkle; the selectors now glow!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: new Compose e2e coverage for mock-server-supported features.
Description check ✅ Passed The description covers Goal, Implementation, and Testing well, but omits the template’s UI Changes, checklists, and GIF sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch andrerego/and-1328-e2e-coverage-for-the-compose-features-supported-by-the

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 79cffee and fa7d068.

📒 Files selected for processing (12)
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/pages/ChannelListPage.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/pages/MessageListPage.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobot.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotChannelListAsserts.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/ChannelActionsTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageActionsTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/PinnedMessagesTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/ReactionsTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/UnreadMessagesTests.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/MembersList.kt
  • stream-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.
@andremion
andremion marked this pull request as ready for review July 27, 2026 19:12
@andremion
andremion requested a review from a team as a code owner July 27, 2026 19:12
@andremion
andremion enabled auto-merge (squash) July 28, 2026 08:33

@gpunto gpunto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@sonarqubecloud

Copy link
Copy Markdown

@andremion
andremion merged commit c82eaa3 into develop Jul 28, 2026
19 checks passed
@andremion
andremion deleted the andrerego/and-1328-e2e-coverage-for-the-compose-features-supported-by-the branch July 28, 2026 14:50
@stream-public-bot stream-public-bot added the released Included in a release label Jul 30, 2026
@stream-public-bot

Copy link
Copy Markdown
Contributor

🚀 Available in v7.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:test Test-only changes released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants