-
Notifications
You must be signed in to change notification settings - Fork 20
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 for RN SDK. #376
Conversation
This pull request has been linked to Shortcut Story #228487: Detox in CI. |
"detox-build-ios": "detox build -c ios.sim.release", | ||
"detox-run-ios": "detox test -c ios.sim.release --cleanup --headless", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use release builds for e2e tests instead of debug builds.
@@ -12,11 +17,5 @@ yarn expo-prebuild | |||
echo "===== Delete .xcode.env.local" | |||
rm -rf ./ios/.xcode.env.local | |||
|
|||
echo "===== Start metro in background" | |||
yarn start & | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metro no longer needed in release builds when running e2e.
<ScrollView style={{ flexGrow: 0.2, backgroundColor: 'black', maxHeight: 200 }}> | ||
<Text style={{ color: 'orange' }}>Logging: {JSON.stringify(context, null, 2)}</Text> | ||
</ScrollView> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace Text
with a ScrollView
so ui elements don't shift when the json string gets displayed. The shitfing affects UI elements positioning and hence tapping/clicking fails.
}, | ||
"packageManager": "[email protected]", | ||
"installConfig": { | ||
"hoistingLimits": "workspaces" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force example app to use its own copies of deps, except for @launchdarkly/* deps. Without this, different versions of the a package like event-target-shim
will conflict and result in cryptic metro compilation errors.
@kinyoklion @louis-launchdarkly This also fixes the RN SDK example app which is broken right now because of conflicting monorepo versions of |
Runs e2e tests for iOS. Android will follow in a separate PR. Only contains basic eval and variation tests right now.