Skip to content

Re-enable the failed-message channel preview e2e test - #6581

Merged
andremion merged 4 commits into
developfrom
andrerego/and-256-chatcompose-failed-message-should-be-displayed-in-channel
Jul 23, 2026
Merged

Re-enable the failed-message channel preview e2e test#6581
andremion merged 4 commits into
developfrom
andrerego/and-256-chatcompose-failed-message-should-be-displayed-in-channel

Conversation

@andremion

@andremion andremion commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Goal

Re-enable the e2e test test_errorIndicatorShownInPreview_whenMessageFailedToBeSent, ignored since January 2025, and fix the selector bug that made it fail. The SDK behavior is correct: the channel preview shows the failed delivery icon for a message with SyncStatus.FAILED_PERMANENTLY (confirmed by the CI failure screenshot and UI hierarchy dump, which show the icon rendered with the expected resource id). The test failed because it asserted the wrong tag.

Resolves AND-256

Implementation

  • The channel preview renders the failed state via MessageReadStatusIcon, tagged Stream_MessageReadStatus_isError. The page object reused the message list's Stream_MessageFailedIcon tag, which never exists in the channel list, so the assertion could only pass when a leftover message-list node was still present during the pane transition. The read, pending, and sent tags are shared between the two surfaces, which is why only the failed variant was broken.
  • ChannelListPage.Channel.deliveryStatusIsFailed now points to Stream_MessageReadStatus_isError, and the test asserts it through a new assertFailedMessageDeliveryStatusInPreview helper.
  • Removed the @Ignore from the test. No production code changes.

🎨 UI Changes

No UI changes.

Testing

  1. In the app: open a channel, force message sends to fail, send a message, and go back to the channel list. The preview shows the message with the failed delivery icon.
  2. The fixed test passed 3 of 3 normal local runs, plus 1 run against a mock patched to delay the failure response by 3 seconds, so the assertion also holds when the failure lands after the navigation back.

The behavior no longer reproduces: the channel preview shows the failed
delivery icon for a message with SyncStatus.FAILED_PERMANENTLY, the same
condition the message list uses.
@github-actions

github-actions Bot commented Jul 20, 2026

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.

@andremion andremion added the pr:test Test-only changes label Jul 20, 2026
@andremion

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 20, 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.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The preview failure test for message delivery status is re-enabled by removing its @Ignore annotation.

Changes

Message delivery test execution

Layer / File(s) Summary
Enable preview failure test
stream-chat-android-compose-sample/src/androidTestE2eDebug/.../MessageDeliveryStatusTests.kt
Removes the skip annotation from test_errorIndicatorShownInPreview_whenMessageFailedToBeSent, allowing it to run in the test suite.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Poem

A bunny found a test asleep,
And nudged it from its hiding heap.
No more ignore, the checks now run,
Delivery errors meet the sun! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly summarizes the main change: re-enabling the failed-message channel preview e2e test.
Description check ✅ Passed The description matches the template well, with Goal, Implementation, UI Changes, and Testing sections filled in.
✨ 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-256-chatcompose-failed-message-should-be-displayed-in-channel

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.

@github-actions

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.21 MB 11.21 MB 0.00 MB 🟢
stream-chat-android-compose 12.69 MB 12.69 MB 0.00 MB 🟢

The channel preview renders the failed state via MessageReadStatusIcon
(Stream_MessageReadStatus_isError), while the page object reused the
message list's Stream_MessageFailedIcon tag, which never exists in the
channel list. The test could only pass when a leftover message-list node
was still present during the pane transition.
@andremion
andremion marked this pull request as ready for review July 20, 2026 15:54
@andremion
andremion requested a review from a team as a code owner July 20, 2026 15:54
@andremion
andremion enabled auto-merge (squash) July 20, 2026 15:57
@sonarqubecloud

Copy link
Copy Markdown

@andremion
andremion merged commit a721f69 into develop Jul 23, 2026
19 checks passed
@andremion
andremion deleted the andrerego/and-256-chatcompose-failed-message-should-be-displayed-in-channel branch July 23, 2026 08:34
@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