e2e: Cover poll creation and voting - #6649
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe change adds poll UI test tags, page selectors, robot actions, participant poll operations, assertion helpers, and end-to-end tests for poll creation, voting, results, vote removal, and poll closure. ChangesPoll UI instrumentation and selectors
Poll test APIs and scenarios
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This PR adds end-to-end poll coverage and test tags without reported behavior changes; the listed checks and poll workflows pass, so no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant PollsTests
participant UserRobot
participant CreatePollPage
participant PollMessage
participant ParticipantRobot
PollsTests->>UserRobot: createPoll(question, options)
UserRobot->>CreatePollPage: enter question and options
CreatePollPage->>PollMessage: submit poll
UserRobot->>PollMessage: cast or remove vote
ParticipantRobot->>PollMessage: post participant vote
UserRobot->>PollMessage: open results or end poll
PollsTests->>UserRobot: assert poll state
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
|



Goal
Cover polls end to end in the Compose sample: creating a poll from the attachment picker, voting and removing a vote in the message list, a participant vote arriving over the websocket, and ending a poll.
Requires the mock server poll support from GetStream/stream-chat-test-mock-server#62. The workflow runs linked below pass
mock_server_branchuntil it merges.Resolves AND-1330
Implementation
PollsTestswith five tests, plus the poll page objects (CreatePollPageand aPollsection inMessageListPage), theUserRobotactions (createPoll,castPollVote,removePollVote,openPollResults,endPoll) andUserRobotPollAsserts.ParticipantRobotgainscastPollVote(option)andaddPollAnswer(answer), backed by the new mock robot routeparticipant/poll_vote.Stream_PollQuestionInput,Stream_PollOptionInput,Stream_PollAddOptionButton,Stream_PollCreateButton), the poll bubble (Stream_PollOptionVotingRowplus one tag per action button), the end-poll confirmation (Stream_PollEndConfirmButton) and the picker button (Stream_AttachmentPickerCreatePollButton).FullscreenDialogand the end-pollAlertDialogrender in their own windows, so they now settestTagsAsResourceId, the same wayStreamModalBottomSheetalready does. No behavior change;PollButtonshad its answers branch extracted into a privatePollAnswersButtonto stay under the detekt method length limit.EditTextinside the tagged container, because setting text on any other node is silently ignored. A vote is asserted through the option row's toggle state, which waits out the vote round trip. The defaultPollPickerModeauto-opens the creation dialog when the Polls tab is selected, so the picker button is never tapped.Testing
PollsTestsare green locally against the mock server PR branch (API 35 emulator, per-test data isolation, five out of five), re-run after rebasing onto the latest develop.spotlessCheck,detekt,apiCheck(no public API changes, the touched composables are internal or private) and:stream-chat-android-compose:verifyPaparazziDebugall pass. The tags do not change rendering.Summary by CodeRabbit