Skip to content

Commit

Permalink
chore(react-native): uncomment detox e2e test to build and test nativ…
Browse files Browse the repository at this point in the history
…e ios
  • Loading branch information
xiongemi committed Oct 5, 2021
1 parent 6caba47 commit 946fe04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Expand Up @@ -207,6 +207,17 @@ commands:
command: |
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=<< parameters.exclude-projects >>
no_output_timeout: 45m
- when:
condition:
equal: [<< parameters.e2e-test-filter >>, 'MACOS-Tests']
steps:
- run:
name: Install applesimutils, reset ios simulators
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
brew install applesimutils
xcrun simctl shutdown all && xcrun simctl erase all
no_output_timeout: 20m
- unless:
condition:
equal: [<< parameters.e2e-test-filter >>, '']
Expand Down
7 changes: 3 additions & 4 deletions e2e/detox/src/detox.test.ts
Expand Up @@ -6,6 +6,7 @@ import {
runCLIAsync,
uniq,
getSelectedPackageManager,
killPorts,
} from '@nrwl/e2e/utils';

describe('Detox', () => {
Expand All @@ -31,7 +32,7 @@ describe('Detox', () => {

describe('React Native Detox MACOS-Tests', () => {
if (isOSX()) {
it('should build and test ios MACOS-Tests', async () => {
it('should build and test ios', async () => {
const appName = uniq('myapp');
runCLI(
`generate @nrwl/react-native:app ${appName} --e2eTestRunner=detox --linter=eslint`
Expand All @@ -41,8 +42,7 @@ describe('Detox', () => {
'Running target "build-ios" succeeded'
);

// comment out due to github issue that unable to build xcode error 12.5 https://github.com/facebook/react-native/issues/31480
/* expect(runCLI(`build-ios ${appName}-e2e --pod`)).toContain(
expect(runCLI(`build-ios ${appName}-e2e --pod`)).toContain(
'Running target "build-ios" succeeded'
);
expect(
Expand All @@ -52,7 +52,6 @@ describe('Detox', () => {
).toContain('Running target "test-ios" succeeded');

await killPorts(8081); // kill the port for the serve command
*/
}, 1000000);
}
});
Expand Down

0 comments on commit 946fe04

Please sign in to comment.