Skip to content

Commit

Permalink
[e2e] improve e2e iOS tests (#1649)
Browse files Browse the repository at this point in the history
* improve test:e2e:ios:local, skip bundling on CI since we do it manualy

* use already existing command

* run preios before tests build and use --repo-update flag
  • Loading branch information
dratwas authored Feb 18, 2020
1 parent 48751d4 commit 6c67d47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- ios/vendor
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || yarn react-native run-ios --configuration Release --no-packager
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || SKIP_BUNDLING=true yarn test:e2e:build-app:ios
- run:
name: Bundle iOS
command: yarn test:e2e:bundle:ios
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"android": "react-native run-android",
"prewpandroid": "rm -Rf $TMPDIR/gbmobile-wpandroidfakernroot && mkdir $TMPDIR/gbmobile-wpandroidfakernroot && ln -s $(cd \"$(dirname \"../../../\")\"; pwd) $TMPDIR/gbmobile-wpandroidfakernroot/android",
"wpandroid": "yarn android --root $TMPDIR/gbmobile-wpandroidfakernroot --variant wasabiDebug --appIdSuffix beta --appFolder WordPress --main-activity=ui.WPLaunchActivity",
"preios": "cd ios && (bundle check --path=vendor/bundle > /dev/null || bundle install) && bundle exec pod repo update && bundle exec pod install",
"preios": "cd ios && (bundle check --path=vendor/bundle > /dev/null || bundle install) && bundle exec pod install --repo-update",
"ios": "react-native run-ios",
"ios:fast": "react-native run-ios",
"test": "cross-env NODE_ENV=test jest --verbose --config jest.config.js",
Expand All @@ -110,13 +110,12 @@
"test:e2e:ios": "TEST_RN_PLATFORM=ios yarn device-tests",
"test:e2e:android:local": "yarn test:e2e:build-app:android && yarn test:e2e:install-app:android && TEST_RN_PLATFORM=android yarn device-tests:local",
"test:e2e:android:local:debug": "yarn test:e2e:build-app:android && yarn test:e2e:install-app:android && yarn test:e2e:android:debug",
"test:e2e:ios:local": "yarn test:e2e:build-app:ios && yarn test:e2e:install-app:ios && TEST_RN_PLATFORM=ios yarn device-tests:local",
"test:e2e:ios:local": "yarn test:e2e:build-app:ios && TEST_RN_PLATFORM=ios yarn device-tests:local",
"test:e2e:bundle:android": "mkdir -p android/app/src/main/assets && react-native bundle --reset-cache --platform android --dev false --minify false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
"test:e2e:build-app:android": "yarn test:e2e:bundle:android && cd android && ./gradlew clean && ./gradlew assembleDebug",
"test:e2e:install-app:android": "cd android && ./gradlew installDebug",
"test:e2e:bundle:ios": "react-native bundle --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle --assets-dest=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app",
"test:e2e:build-app:ios": "react-native run-ios --configuration Release --no-packager --simulator=\"iPhone 11\" && yarn test:e2e:bundle:ios && WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.app.zip GutenbergDemo.app",
"test:e2e:install-app:ios": "yarn test:e2e:build-app:ios",
"test:e2e:build-app:ios": "yarn ios --configuration Release --no-packager",
"flow": "flow",
"prettier": "prettier-eslint --write $npm_package_config_jsfiles $npm_package_config_scssfiles",
"prettier:check": "prettier-eslint --list-different $npm_package_config_jsfiles $npm_package_config_scssfiles || { echo '\nERROR: `yarn prettier:check` found a formatting problem.\nNo files have been changed. Try running `yarn prettier` to fix any formatting issues.\n'; exit 1; }",
Expand Down

0 comments on commit 6c67d47

Please sign in to comment.