-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add Detox e2e tests & BrowserStack CI #808
Conversation
… behavior in detoxrc to work on github workflow.
… NDK (Native Development Kit) required by the react-native-mmkv module for native code compilation.
…fail... experimenting.
Im going to close this since we are probably not going to be using detox! |
@cimigree did this get to a stage where tests were running and passing on browserstack? I ask because if this is actually working, this is better than not having tests, so even if we plan to not use detox in the future, it seems worth using this as an interim measure. If it's not working and still requires additional work then maybe best to just close and discard. |
This adds e2e tests using Detox, plus CI integration with BrowserStack for running tests on real devices.
Unfortunately, right now it's not possible to run the app with any permissions (camera and location) enabled in BrowserStack testing. When testing locally, Detox installs the APK via
adb install -g
. The-g
argument causes the app to be installed with all the permissions already enabled. When running Detox tests on BrowserStack, BrowserStack uses their own mechanism to install the APK, and does not expose an ADB connection.Using Detox tests, there is no way to respond to a permission dialog in tests, because Detox uses gray box testing.
As a temporary fix, this PR introduces a
EXPO_PUBLIC_IS_E2E
environment variable, which is set when building for detox. If this variable is set, then the app does not ask for permissions.This means that all components in the app will be in the "no permissions granted" state.