Skip to content

Commit 477621b

Browse files
author
Gerardo
committed
Test installing Appium drivers
1 parent 648cf2b commit 477621b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.buildkite/commands/test-ios.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ set +e
4646
echo "$SECTION"
4747

4848
echo "Prepare tests setup"
49-
npm run core test:e2e:setup
49+
npm run test:e2e:setup
5050

5151
echo "Bundle iOS"
5252
npm run test:e2e:bundle:ios

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"device-tests-ipad": "cross-env NODE_ENV=test IPAD=true jest --maxWorkers=2 --testPathPattern=@ipad --config jest_ui.config.js",
9090
"device-tests:local": "APPIUM_HOME=$HOME/.appium IOS_APP_PATH='./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app' WDA_PATH='./gutenberg/packages/react-native-editor/ios/build/WDA' ANDROID_APP_PATH='./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk' NODE_ENV=test jest --maxWorkers=2 --detectOpenHandles --config jest_ui.config.js",
9191
"device-tests:debug": "IOS_APP_PATH='./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app' WDA_PATH='./gutenberg/packages/react-native-editor/ios/build/WDA' ANDROID_APP_PATH='./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk' cross-env NODE_ENV=test node $NODE_DEBUG_OPTION --inspect-brk node_modules/jest/bin/jest --runInBand --detectOpenHandles --verbose --config jest_ui.config.js",
92+
"test:e2e:setup": "output=`APPIUM_HOME=$HOME/.appium appium driver list --installed --json` && (echo $output | grep -q 'uiautomator2' && echo 'uiautomator2 is installed, skipping installation.' || (echo 'uiautomator2 not found, installing...' && APPIUM_HOME=$HOME/.appium appium driver install uiautomator2)) && (echo $output | grep -q 'xcuitest' && echo 'xcuitest is installed, skipping installation.' || (echo 'xcuitest not found, installing...' && APPIUM_HOME=$HOME/.appium appium driver install xcuitest))",
9293
"test:e2e:bundle:android": "npm run test:e2e:bundle:android:text && npm run test:e2e:bundle:android:bytecode",
9394
"test:e2e:bundle:android:text": "mkdir -p gutenberg/packages/react-native-editor/android/app/src/main/assets && npm run rn-bundle -- --reset-cache --platform android --dev false --minify false --entry-file index.js --bundle-output gutenberg/packages/react-native-editor/android/app/src/main/assets/index.android.text.bundle --assets-dest gutenberg/packages/react-native-editor/android/app/src/main/res",
9495
"test:e2e:bundle:android:bytecode": "./gutenberg/node_modules/react-native/sdks/hermesc/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out gutenberg/packages/react-native-editor/android/app/src/main/assets/index.android.bundle gutenberg/packages/react-native-editor/android/app/src/main/assets/index.android.text.bundle -output-source-map",

0 commit comments

Comments
 (0)