Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions scripts/android-e2e-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
})
Expand All @@ -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);
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-ci-e2e-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion template/ios/HelloWorldTests/HelloWorldTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import <React/RCTRootView.h>

#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
#define TEXT_TO_LOOK_FOR @"Welcome to React"

@interface HelloWorldTests : XCTestCase

Expand Down