Skip to content

e2e: Re-enable the recovered tests and settle the ignored-test decisions#6573

Merged
andremion merged 3 commits into
developfrom
andrerego/and-1304-reenable-recovered-e2e-tests
Jul 17, 2026
Merged

e2e: Re-enable the recovered tests and settle the ignored-test decisions#6573
andremion merged 3 commits into
developfrom
andrerego/and-1304-reenable-recovered-e2e-tests

Conversation

@andremion

@andremion andremion commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Goal

Settle the fate of the remaining ignored e2e tests, based on the per-test verification recorded on AND-1304. Eleven tests come back to the active suite, and the ones that stay ignored now point at real, open tickets instead of canceled ones. Part of AND-1304.

Implementation

  • 6 tests re-enabled as they were: their canceled bug tickets described behavior that is correct on current develop (verified by running each test locally on the fixed harness). Two of them only needed the current empty-state copy (No messages yet, no sender prefix).
  • 1 test re-enabled with a rewritten assertion: the channel preview deliberately shows Message deleted when the only message is deleted (documented intent in getLastMessageIncludingDeleted, and iOS shows the same placeholder), so test_channelPreviewShowsNoMessages_whenTheOnlyMessageInChannelIsDeleted became test_channelPreviewShowsMessageDeleted_... and expects the placeholder.
  • 4 quoted-reply tests fixed and re-enabled: their failures were port bugs in the tests, not product bugs. The expected quoted text said 30 where the mock quotes the oldest message (1, matching the active sibling test and iOS), and the attachment variants asserted reply text that their robot calls never send (iOS asserts only the quote plus the attachment). The user variants now quote deterministically by message text after scrolling to the top, instead of by an index that Compose's LazyColumn cannot reach.
  • 1 test deleted: test_commandsMenuCloses_whenUserTapsOnMessageList asserted old-composer behavior; the redesigned suggestion list is driven by the input content and iOS has no counterpart. Its orphaned robot helper went with it.
  • 3 tests parked on reopened AND-960: tapping a quote in a thread does not jump to the quoted reply unless its cell was previously composed; reproduced deterministically with artifacts. The fix PR for AND-960 re-enables them.
  • Harness: one more stale-read fix (assertMessage's absence branch now checks at the selector level), assertQuotedMessage's text parameter is optional to mirror the iOS helper shape, and a quoteMessage(text, quotedMessageText) overload for by-text quoting.

Ticket trail: AND-256, AND-272, and AND-960 are reopened with their tests as the acceptance check; the other linked tickets stay canceled with closing comments.

Testing

Every re-enabled test passed locally against the mock server on the first attempt, verified per batch while making the changes (retry data on the device checked to rule out pass-on-retry). Reproduce with:

./gradlew :stream-chat-android-compose-sample:connectedE2eDebugAndroidTest \
  -Pandroid.testInstrumentationRunnerArguments.class=io.getstream.chat.android.compose.tests.QuotedReplyTests

No UI changes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved end-to-end validation for quoted replies, deleted messages, empty channels, ephemeral messages, and message delivery states.
    • Updated channel previews to display “No messages yet” for empty channels and a deleted-message indicator when applicable.
  • Tests

    • Re-enabled coverage for scrolling, quoted replies, delivery status, and ephemeral-message scenarios.
    • Added support for composing replies to specifically selected quoted messages.
    • Removed an obsolete message-list interaction test.

@andremion
andremion requested a review from a team as a code owner July 15, 2026 11:10
@github-actions

github-actions Bot commented Jul 15, 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:ci CI changes label Jul 15, 2026
@andremion

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

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

@andremion
andremion marked this pull request as draft July 15, 2026 11:11
@andremion andremion added pr:test Test-only changes and removed pr:ci CI changes labels Jul 15, 2026
@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 🟢

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Compose sample E2E robot helpers and assertions were updated for text-targeted quoted replies and conditional quote checks. Channel preview expectations changed, several ignored tests were re-enabled, one test was removed, and quoted reply scenarios now cover message, file, Giphy, and thread cases.

Changes

Compose E2E test updates

Layer / File(s) Summary
Robot quoting and assertions
stream-chat-android-compose-sample/.../robots/UserRobot.kt, stream-chat-android-compose-sample/.../robots/UserRobotMessageListAsserts.kt
Adds text-targeted quoting, removes the screen-center helper, and makes message and quoted-message visibility assertions more specific and optional.
Channel preview expectations
stream-chat-android-compose-sample/.../tests/ChannelListTests.kt, stream-chat-android-compose-sample/.../tests/GiphyTests.kt
Updates empty, deleted, and ephemeral channel preview expectations and enables the affected tests.
Quoted reply scenarios
stream-chat-android-compose-sample/.../tests/QuotedReplyTests.kt
Uses the first message as quoted content across message, file, Giphy, and thread scenarios, with updated visibility and file assertions.
Re-enabled message behavior tests
stream-chat-android-compose-sample/.../tests/MessageDeliveryStatusTests.kt, stream-chat-android-compose-sample/.../tests/MessageListTests.kt
Re-enables selected delivery-status and scrolling tests and removes the command-menu test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: pr:improvement

Poem

A rabbit taps where quoted words gleam,
Replies hop neatly through the test stream.
Empty previews now speak just right,
Deleted notes show in plain sight.
Tests wake up and run with cheer—
“Hop reviewed!” whispers the hare.

🚥 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 accurately summarizes the main change: re-enabling recovered e2e tests and revisiting ignored-test decisions.
Description check ✅ Passed The description includes Goal, Implementation, and Testing, matching the template's core required sections.
✨ 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-1304-reenable-recovered-e2e-tests

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.

🧹 Nitpick comments (1)
stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt (1)

68-75: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use correct locator for the non-displayed assertion.

Currently, if isDisplayed is false and isClickable is true, the else branch ignores the isClickable parameter and asserts that the non-clickable Message.text disappears instead of the correct clickableText.

Extracting the locator assignment out of the if block resolves this test logic discrepancy.

♻️ Proposed refactor
-    if (isDisplayed) {
-        val textLocator = (if (isClickable) Message.clickableText else Message.text)
-            .text(text)
+    val textLocator = (if (isClickable) Message.clickableText else Message.text).text(text)
+    if (isDisplayed) {
         assertTrue(textLocator.waitDisplayed())
         assertTrue(Message.timestamp.isDisplayed())
     } else {
-        assertFalse(Message.text.text(text).waitToDisappear().isDisplayed())
+        assertFalse(textLocator.waitToDisappear().isDisplayed())
     }
🤖 Prompt for 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.

In
`@stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt`
around lines 68 - 75, Update the assertion logic in the message-list assertion
method to create the text locator once using the existing isClickable choice
between Message.clickableText and Message.text, then reuse that locator in both
branches. Ensure the non-displayed path asserts disappearance of the selected
locator rather than always using Message.text.
🤖 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.

Nitpick comments:
In
`@stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt`:
- Around line 68-75: Update the assertion logic in the message-list assertion
method to create the text locator once using the existing isClickable choice
between Message.clickableText and Message.text, then reuse that locator in both
branches. Ensure the non-displayed path asserts disappearance of the selected
locator rather than always using Message.text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c9ea42e0-e497-4340-bf27-166f1ca539f2

📥 Commits

Reviewing files that changed from the base of the PR and between 4338a8e and 6c73737.

📒 Files selected for processing (7)
  • 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/UserRobotMessageListAsserts.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/ChannelListTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/GiphyTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageListTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/QuotedReplyTests.kt
💤 Files with no reviewable changes (2)
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt
  • stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageListTests.kt

@andremion
andremion requested a review from testableapple July 15, 2026 11:15
@sonarqubecloud

Copy link
Copy Markdown

@andremion
andremion marked this pull request as ready for review July 15, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:test Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants