Repository navigation
test: add Detox e2e suite with a dedicated E2ETestApp - #3881
Open
testableapple wants to merge 15 commits into
Open
testableapple wants to merge 15 commits into
testableapple wants to merge 15 commits into
Conversation
testableapple
marked this pull request as ready for review
October 20, 2026 18:09
Contributor
SDK Size
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Goal
E2E test automation for the SDK, on par with the native iOS/Android and Flutter suites, running on PRs.
Linear: RN-450, RN-451, RN-452, RN-453, RN-454, RN-455, RN-457 (parent RN-449)
🛠 Implementation details
Dedicated app:
examples/E2ETestApp. A new bare RN 0.88 workspace with only the SDK and its required peer dependencies (no Firebase, maps, video or navigation library), like the native SDKs'StreamChatUITestsApp. It has three screens: a user selector, the channel list, and a channel stacked over the list. It reads aMOCK_SERVER_URLlaunch argument (react-native-launch-arguments), never persists a login and runs without offline storage, so every test starts clean. A clean Release build takes ~2 min on an M-series Mac; the SampleApp took ~15 min on Android. The SampleApp app is unchanged; only its Fastfile gains the e2e lanes.Framework (RN-450): Detox 20 + Jest 30 in
examples/E2ETestApp/e2e/, withios.sim.*,android.emu.*andandroid.att.*configs (debug and release).Mock server (RN-451): the shared
stream-chat-test-mock-server, one server per test through its driver (port 4569).Page objects (RN-452) and robots (RN-453, RN-454, RN-455): structure and naming follow the native suites:
BackendRobot/ParticipantRobot: 1:1 ports of the Android robotsUserRobot+UserRobot*Asserts: assert extensions, like Android'sLoginPage/ChannelListPage/MessageListPagesetUpStreamTestCase(),step(), and uiautomator-style element helpersRobots chain fluently like the native ones:
await userRobot.login().openChannel().assertMessage('Hi').Smoke suite: 6 tests (MessageList ×3, ChannelList ×3), named after their Android counterparts and keeping the native expectations.
SDK (additive testIDs only):
channel-preview-title,channel-preview-message,channel-preview-sender, andmessage-status-{read,delivered,sending,sent}, with a unit test.CI (RN-457):
.github/workflows/e2e-test.yml.ubuntu-latest, KVM, API 36 AOSP emulator,pixelprofile (the native Android SDK's setup).workflow_dispatchwithios: true), not on PRs, to save CI time and macOS runners:macos-15, Xcode 26.2, iPhone 17 Pro.Check E2E Requiredjob runsis_check_requiredover the e2e sources (Fastfileimpact_analysis), andtest_e2echecks it too.Test E2E Resultis the check to require in branch protection. It covers Android (it doesn't wait for iOS) and passes when the Android job passes or is skipped as not required..app/.apk, keyed on the app and SDK sources but not one2e/, so a test-only change skips the native buildnode_modulesofyarn workspaces focus e2etestappCCACHE_BINARYexported, without which RN's ccache wrappers silently skip ccache), the Detox framework, Gradle (cache-read-only: false, sincesetup-gradleotherwise only writes on the default branch), and the mock server's gemsdevelop): its first run builds cold, and later pushes reuse themFastlane (in
examples/SampleApp/fastlane, next to the repo's other lanes):start_mock_server,stop_mock_server,e2e_pod_install,test_e2e,e2e_check_required.Notable findings, documented in
examples/E2ETestApp/e2e/README.md:message-list-item-*,message-text-container) empty, with their content as siblings, so page objects scope tomessage-content-wrapperor the list instead.launchApp({ permissions })makes Detox restart SpringBoard once per permission on every launch. On CI that cost 1.5–3 min per test, so the suite doesn't pass any.How to run and extend the suite:
examples/E2ETestApp/e2e/README.md.🎨 UI Changes
None (testIDs only).
🧪 Testing
e2e_check_requiredagainst real PRs: no PR →true, docs: v10 breaking-changes inventory and v9→v10 ledger audit #3870 (docs only) →false, fix: channel list swipable stuck state after unmount #3879 (package/) →true.yarn build,yarn lint,yarn typecheck(now includinge2etestapp),cd package && yarn test:typecheck,yarn test:unitgreen.Not covered yet: Allure TestOps reporting, full suite ports, and iOS on PRs (manual runs only, to save CI time and macOS runners).
☑️ Checklist
developbranch