ci(repo): Add E2E message list tests - #2854
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesMessage list integration testing
Thread typing indicator
iOS framework embedding
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 `@sample_app/integration_test/support/widget_test_extensions.dart`:
- Around line 47-93: Replace the unbounded pumpAndSettle() calls in tapFinder,
scrollMessageList, and scrollUpUntilVisible with the bounded settle() helper
already used by the visibility methods. Preserve the existing sequencing and
ensure scrollUpUntilVisible’s timeout can be enforced between iterations even
when perpetual animations are active.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 20fd9c56-b7e3-4570-aada-4ceca4e1deac
📒 Files selected for processing (10)
sample_app/fastlane/Fastfilesample_app/integration_test/message_list_test.dartsample_app/integration_test/pages/message_list_page.dartsample_app/integration_test/robots/participant_robot.dartsample_app/integration_test/robots/user_robot.dartsample_app/integration_test/robots/user_robot_message_list_asserts.dartsample_app/integration_test/support/stream_test_env.dartsample_app/integration_test/support/widget_test_extensions.dartsample_app/ios/Runner.xcodeproj/project.pbxprojsample_app/lib/pages/thread_page.dart
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2854 +/- ##
=======================================
Coverage 72.83% 72.83%
=======================================
Files 428 428
Lines 27657 27657
=======================================
Hits 20144 20144
Misses 7513 7513 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # sample_app/integration_test/support/stream_test_env.dart
Linear: https://linear.app/stream/issue/FLU-603
CLA
Description of the pull request
Ports the native
MessageList_Tests.swift/MessageListTests.ktsuite to the sample app's integration tests, plus the harness plumbing it needed. Second suite after #2825 (reactions).New tests (
integration_test/message_list_test.dart) — 27 total: 23 active, 4 skippedEditedfootnote)@and disappears when it's removedHarness additions
pages/message_list_page.dart— action rows, list, composer overlays, back button, thread header. All selectors reuse identifiers the SDK already exposes; no test-only keys were added to the SDK.support/widget_test_extensions.dart—tapFinder(ensureVisible + tap for below-fold modal rows),scrollMessageList(delta),scrollUpUntilVisible, plus a boundedsettle()so a perpetual reconnect animation can't hangpumpAndSettle.robots/user_robot.dart— edit / delete / openThread / typeText / clearComposer / tapBackButton / scroll, with chain mirrors;user_robot_message_list_asserts.dartgained edited / deleted / hardDeleted / typing / mentions / linkPreview / threadReply asserts plus pagination and the twogetSize-based geometry asserts.robots/participant_robot.dart— chain mirrors for editMessage / deleteMessage / sendMessageInThread / startTyping / stopTyping.support/stream_test_env.dart—moveToBackground()/moveToForeground()lifecycle helpers.lib/pages/thread_page.dart— the sample app's thread page now renders aStreamTypingIndicator(parentId:), which is what the thread-typing test asserts on.CI: recover a simulator that dies mid-run
The first nightly run of this suite exposed an unrelated harness gap. On the iOS 17.5 leg (job 89985512388) the simulator itself died ~11 min in: 17 tests had passed, the 18th went silent mid-setup, the remaining tests were reported as instant passes with no output, and
flutter testexited non-zero. Becauseprepare_simulatorran once before the attempt loop, every retry after that failed in ~15s withNo supported devices found with name or id matching <udid>— andreactions_test.dartnever ran a single test.run_e2e_testnow callsboot_simulatorat the top of every attempt except the first: a no-op when the device is already booted,simctl bootstatus -bwhen it is shut down, and an early return when the udid is gone entirely (so a missing device can't block the run). One crashed simulator now costs one attempt instead of the rest of the job.WIP
user adds a message while offlinechannel.sendMessagethrows an unhandled asyncStreamChatNetworkErrorthat theintegration_testbinding surfaces and that poisons the rest of the bundle.user recovers a message received while in the backgroundmoveToForeground → client.maybeReconnectspins indefinitely under the in-process binding and hangs the run.Summary by CodeRabbit
Summary by CodeRabbit