diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cf18599cbe96c..563bc3e8a03284 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -507,16 +507,15 @@ jobs: node ./scripts/run-ci-e2e-tests.js --js --retries 3 when: always - # - run: - # name: Run iOS End-to-End Tests - # command: | - # # free up port 8081 for the packager before running tests - # set +eo pipefail - # lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill - # set -eo pipefail - # node ./scripts/run-ci-e2e-tests.js --ios --retries 3; - # when: always - + - run: + name: Run iOS End-to-End Tests + command: | + # free up port 8081 for the packager before running tests + set +eo pipefail + lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill + set -eo pipefail + node ./scripts/run-ci-e2e-tests.js --ios --retries 3; + when: always # ------------------------- # JOBS: Test Android diff --git a/scripts/android-e2e-test.js b/scripts/android-e2e-test.js index 404902cbfd0509..be4d076acc7b3b 100644 --- a/scripts/android-e2e-test.js +++ b/scripts/android-e2e-test.js @@ -110,15 +110,12 @@ describe('Android Test App', function() { return ( driver .waitForElementByXPath( - '//android.widget.TextView[starts-with(@text, "Welcome to React Native!")]', + '//android.widget.TextView[starts-with(@text, "Welcome to React")]', ) .then(() => { fs.writeFileSync( 'App.js', - androidAppCode.replace( - 'Welcome to React Native!', - 'Welcome to React Native! Reloaded', - ), + androidAppCode.replace('Step One', 'Step 1'), 'utf-8', ); }) @@ -128,7 +125,7 @@ describe('Android Test App', function() { .pressDeviceKey(46) .sleep(2000) .waitForElementByXPath( - '//android.widget.TextView[starts-with(@text, "Welcome to React Native! Reloaded")]', + '//android.widget.TextView[starts-with(@text, "Step 1")]', ) .finally(() => { clearInterval(intervalToUpdate); @@ -145,7 +142,7 @@ describe('Android Test App', function() { return ( driver .waitForElementByXPath( - '//android.widget.TextView[starts-with(@text, "Welcome to React Native!")]', + '//android.widget.TextView[starts-with(@text, "Welcome to React")]', ) // http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_MENU .pressDeviceKey(82) diff --git a/scripts/run-ci-e2e-tests.js b/scripts/run-ci-e2e-tests.js index f46e92075a069d..95312e7998d57a 100644 --- a/scripts/run-ci-e2e-tests.js +++ b/scripts/run-ci-e2e-tests.js @@ -81,7 +81,7 @@ try { } } - if (exec('yarn pack').code) { + if (exec('npm pack').code) { echo('Failed to pack react-native'); exitCode = 1; throw Error(exitCode); diff --git a/template/ios/HelloWorldTests/HelloWorldTests.m b/template/ios/HelloWorldTests/HelloWorldTests.m index e9db2f118ab97e..3b45a1a9197b13 100644 --- a/template/ios/HelloWorldTests/HelloWorldTests.m +++ b/template/ios/HelloWorldTests/HelloWorldTests.m @@ -12,7 +12,7 @@ #import #define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" +#define TEXT_TO_LOOK_FOR @"Welcome to React" @interface HelloWorldTests : XCTestCase