From 946fe0461005704354f73bcd7b67db559a97700e Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Mon, 4 Oct 2021 17:15:11 -0400 Subject: [PATCH] chore(react-native): uncomment detox e2e test to build and test native ios --- .circleci/config.yml | 11 +++++++++++ e2e/detox/src/detox.test.ts | 7 +++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac0069d931f5a2..70b440ab3a2d3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 >>, ''] diff --git a/e2e/detox/src/detox.test.ts b/e2e/detox/src/detox.test.ts index b709e794907fa5..fbb793fad4acd9 100644 --- a/e2e/detox/src/detox.test.ts +++ b/e2e/detox/src/detox.test.ts @@ -6,6 +6,7 @@ import { runCLIAsync, uniq, getSelectedPackageManager, + killPorts, } from '@nrwl/e2e/utils'; describe('Detox', () => { @@ -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` @@ -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( @@ -52,7 +52,6 @@ describe('Detox', () => { ).toContain('Running target "test-ios" succeeded'); await killPorts(8081); // kill the port for the serve command - */ }, 1000000); } });