chore(react-native): uncomment detox e2e test to build and test native ios (#7479)
This commit is contained in:
parent
8d6ac4f694
commit
9eb3ac58e9
16
.github/workflows/e2e-matrix.yml
vendored
16
.github/workflows/e2e-matrix.yml
vendored
@ -125,11 +125,25 @@ jobs:
|
||||
sudo apt-get install lsof
|
||||
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
|
||||
- name: Homebrew cache directory path
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
id: homebrew-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(brew --cache)"
|
||||
|
||||
- name: Cache Homebrew
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.homebrew-cache-dir-path.outputs.dir }}
|
||||
key: brew-${{ matrix.node-version }}
|
||||
restore-keys: |
|
||||
brew-
|
||||
|
||||
- name: Install applesimutils, reset ios simulators
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
|
||||
brew install applesimutils
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
|
||||
xcrun simctl shutdown all && xcrun simctl erase all
|
||||
|
||||
- name: Run e2e tests
|
||||
|
||||
@ -6,6 +6,7 @@ import {
|
||||
runCLIAsync,
|
||||
uniq,
|
||||
getSelectedPackageManager,
|
||||
killPorts,
|
||||
} from '@nrwl/e2e/utils';
|
||||
|
||||
describe('Detox', () => {
|
||||
@ -37,14 +38,10 @@ describe('Detox', () => {
|
||||
`generate @nrwl/react-native:app ${appName} --e2eTestRunner=detox --linter=eslint`
|
||||
);
|
||||
|
||||
expect(runCLI(`build-ios ${appName}-e2e`)).toContain(
|
||||
expect(runCLI(`build-ios ${appName}-e2e --prod`)).toContain(
|
||||
'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(
|
||||
'Running target "build-ios" succeeded'
|
||||
);
|
||||
expect(
|
||||
runCLI(
|
||||
`test-ios ${appName}-e2e --prod --debugSynchronization=true --loglevel=trace`
|
||||
@ -52,8 +49,7 @@ describe('Detox', () => {
|
||||
).toContain('Running target "test-ios" succeeded');
|
||||
|
||||
await killPorts(8081); // kill the port for the serve command
|
||||
*/
|
||||
}, 1000000);
|
||||
}, 3000000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import {
|
||||
checkFilesExist,
|
||||
expectTestsPass,
|
||||
getSelectedPackageManager,
|
||||
isOSX,
|
||||
killPorts,
|
||||
newProject,
|
||||
readJson,
|
||||
runCLI,
|
||||
@ -34,15 +37,14 @@ describe('react native', () => {
|
||||
return updated;
|
||||
});
|
||||
|
||||
const appTestResults = await runCLIAsync(`test ${appName}`);
|
||||
expect(appTestResults.combinedOutput).toContain(
|
||||
'Test Suites: 1 passed, 1 total'
|
||||
);
|
||||
expectTestsPass(await runCLIAsync(`test ${appName}`));
|
||||
expectTestsPass(await runCLIAsync(`test ${libName}`));
|
||||
|
||||
const libTestResults = await runCLIAsync(`test ${libName}`);
|
||||
expect(libTestResults.combinedOutput).toContain(
|
||||
'Test Suites: 1 passed, 1 total'
|
||||
);
|
||||
const appLintResults = await runCLIAsync(`lint ${appName}`);
|
||||
expect(appLintResults.combinedOutput).toContain('All files pass linting.');
|
||||
|
||||
const libLintResults = await runCLIAsync(`lint ${libName}`);
|
||||
expect(libLintResults.combinedOutput).toContain('All files pass linting.');
|
||||
|
||||
const iosBundleResult = await runCLIAsync(`bundle-ios ${appName}`);
|
||||
expect(iosBundleResult.combinedOutput).toContain(
|
||||
|
||||
@ -30,6 +30,19 @@
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"13.2.0": {
|
||||
"version": "13.2.0-beta.0",
|
||||
"packages": {
|
||||
"detox": {
|
||||
"version": "19.0.0",
|
||||
"alwaysAddToPackageJson": false
|
||||
},
|
||||
"@testing-library/jest-dom": {
|
||||
"version": "5.15.0",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
"@nrwl/jest": "*",
|
||||
"@nrwl/linter": "*",
|
||||
"@nrwl/react": "*",
|
||||
"@nrwl/workspace": "*",
|
||||
"chalk": "^4.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nrwl/workspace": "*",
|
||||
"detox": "^18.22.2"
|
||||
"detox": "^19.0.0"
|
||||
},
|
||||
"builders": "./executors.json",
|
||||
"ng-update": {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export const nxVersion = '*';
|
||||
|
||||
export const detoxVersion = '18.22.2';
|
||||
export const detoxVersion = '19.0.0';
|
||||
export const typesDetoxVersion = '17.14.3';
|
||||
export const testingLibraryJestDom = '5.14.1';
|
||||
export const testingLibraryJestDom = '5.15.0';
|
||||
|
||||
@ -262,6 +262,23 @@
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"13.2.0": {
|
||||
"version": "13.2.0-beta.0",
|
||||
"packages": {
|
||||
"react-native": {
|
||||
"version": "0.66.2",
|
||||
"alwaysAddToPackageJson": false
|
||||
},
|
||||
"@types/react-native": {
|
||||
"version": "0.66.2",
|
||||
"alwaysAddToPackageJson": false
|
||||
},
|
||||
"@testing-library/jest-native": {
|
||||
"version": "4.0.4",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
"@nrwl/jest": "*",
|
||||
"@nrwl/linter": "*",
|
||||
"@nrwl/react": "*",
|
||||
"@nrwl/workspace": "*",
|
||||
"chalk": "^4.1.0",
|
||||
"ignore": "^5.0.4",
|
||||
"metro-resolver": "^0.66.2",
|
||||
@ -36,8 +37,7 @@
|
||||
"tsconfig-paths": "^3.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nrwl/workspace": "*",
|
||||
"react-native": "^0.66.1"
|
||||
"react-native": "^0.66.2"
|
||||
},
|
||||
"builders": "./executors.json",
|
||||
"ng-update": {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
export const nxVersion = '*';
|
||||
|
||||
export const reactNativeVersion = '0.66.1';
|
||||
export const typesReactNativeVersion = '0.65.8';
|
||||
export const reactNativeVersion = '0.66.2';
|
||||
export const typesReactNativeVersion = '0.66.2';
|
||||
|
||||
export const metroVersion = '0.66.2';
|
||||
|
||||
@ -12,7 +12,7 @@ export const reactNativeCommunityCliAndroid = '6.1.0';
|
||||
export const metroReactNativeBabelPresetVersion = '0.66.2';
|
||||
|
||||
export const testingLibraryReactNativeVersion = '8.0.0';
|
||||
export const testingLibraryJestNativeVersion = '4.0.2';
|
||||
export const testingLibraryJestNativeVersion = '4.0.4';
|
||||
|
||||
export const jestReactNativeVersion = '18.0.0';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user