chore(e2e): add e2e tests on browserstack via Maestro#56
Conversation
still need to wait and poll test run statuses
Browserstack's Maestro support does not seem to support this command (https://www.browserstack.com/docs/app-automate/maestro/references/supported-commands)
gmaclennan
left a comment
There was a problem hiding this comment.
Just some minor bugs and nits. I'll push changes for these to re-run CI and check it all works.
| key: nodejs-mobile-${{ env.NODEJS_MOBILE_VERSION }}-ios-${{ hashFiles('scripts/download-nodejs-mobile.sh') }} | ||
|
|
||
| - name: Download nodejs-mobile binaries | ||
| if: steps.cache-libnode.outputs.cache-hit != 'true' |
| # TODO: Enable when we know this job works | ||
| # needs: [build-android, build-ios] |
There was a problem hiding this comment.
I think we need to re-enable this now?
There was a problem hiding this comment.
Should we create a follow-up to address this? Mostly hygenic to prevent uploading test suites to browserstack when the jobs for building + uploading the apps fail
- Set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60s — the 5s default was tripping the CRUD tests that fan out 100 IPC create()/delete() calls on slower BrowserStack devices. - Track every opened project in project-crud and close them in afterEach so listeners don't accumulate across tests (was producing MaxListenersExceededWarning on SocketMessagePort / LocalPeers and slowing later tests). - Add an `all-tests-done` testID alongside `all-tests-passed` / `all-tests-failed` so Maestro can fail fast on a failing run instead of waiting for the full timeout. - Bump Maestro `extendedWaitUntil` to 5 min and assert pass after done. - Log spec start / pass / fail (with stacks) via console.log so they appear under the ReactNativeJS tag in logcat / device logs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The root package.json `prepare` script (`expo-module prepare`, plus `scripts/check-sentry-cocoa-pin.mjs`) needs to run before the e2e app prebuilds, otherwise the module's native scaffolding isn't regenerated and the iOS Pods build fails to resolve `SentrySDK.startTransaction` through the `Sentry/HybridSDK` module. The `iOS Tests` workflow that builds `apps/example` runs `npm install` (no `--ignore-scripts`) and passes — match that. `patch-package` is already wired up as `postinstall` in both package.jsons, so the explicit `npx patch-package` calls are redundant once scripts run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Seems like the older sodium-native (libsodium) was crashing Android v8.1
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
…or Xcode 26 compat" This reverts commit 8012789.
The Oppo Reno 6-11.0 is no longer supported by Browserstack
…ules npm list --parseable --long appends flag fields (:OVERRIDDEN, :INVALID, ...) after name@version, so taking the last :-field read "OVERRIDDEN" for the override-pinned sodium-native@5.1.0. The module was silently dropped from prebuild download + jniLibs packaging while the bundled JS still referenced it, crashing every device with ERR_DLOPEN_FAILED: libsodium-native__5.1.0.so not found. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Xcode 26's Swift compiler hides SentrySDK.startTransaction (used by SentryNativeBridge) when sentry-cocoa builds from source without BUILD_LIBRARY_FOR_DISTRIBUTION (getsentry/sentry-cocoa#7950). Set it on Sentry pod targets from the library config plugin so every consumer's prebuild gets the workaround, injected inside the existing post_install block (CocoaPods allows only one post_install hook — the previous attempt added a second block, which fails pod install). Register the plugin in the e2e app, which didn't apply it before. Verified locally with Xcode 26.3: the exact CI archive command now succeeds, and the Release app boots on the iOS simulator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The backend build reads the Node ABI from android/libnode headers on every platform. The iOS job only created them on a cache miss (the download script fetches both platforms); a cache hit restored just ios/NodeMobile.xcframework, so any rerun failed with ENOENT on node_version.h. Cache both paths and bump the key so ios-only caches can't hit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gmaclennan
left a comment
There was a problem hiding this comment.
@achou11 this is now passing on CI - the failed tests on Browserstack revealed a bug / incompatibility with older Android version (<9) which is now fixed (needed to rebuild the native deps). I think this is good to merge, it's already proven its worth.
Closes #61
Introduces e2e test automation using Maestro, configured to run as part of CI.
Current workflow diagram (will update as needed):
Relevant links:
TODO: