Skip to content

Commit

Permalink
[e2e] Brody/e2e parallel (#5786)
Browse files Browse the repository at this point in the history
* max-workers

* 5 > 3

* final

* one more

* oop

* test

* nvm

* oops
  • Loading branch information
BrodyHughes committed May 31, 2024
1 parent cfde334 commit a510759
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ module.exports = {
screenshot: 'failing',
},
},
behavior: {
cleanup: {
shutdownDevice: false,
},
},
},
'ios.sim.debug': {
app: 'ios.debug',
Expand All @@ -64,6 +69,11 @@ module.exports = {
screenshot: 'failing',
},
},
behavior: {
cleanup: {
shutdownDevice: false,
},
},
},
'android.emu.release': {
app: 'android.release',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macstadium-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
run: rm -rf ./artifacts/

- name: Build the app in release mode
run: ./node_modules/.bin/detox build --configuration ios.sim.release
run: ./node_modules/.bin/detox build --configuration ios.sim.release | xcpretty --color

- name: Run iOS e2e tests with retry
# change the '5' here to how many times you want the tests to rerun on failure
run: ./scripts/run-retry-tests.sh 5
run: ./scripts/run-retry-tests.sh 3

- name: Upload Test Artifacts
if: failure()
Expand Down
1 change: 1 addition & 0 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export async function importWalletFlow() {
await authenticatePin('1234');
}
await device.enableSynchronization();
await delayTime('very-long');
await checkIfVisible('wallet-screen');
}

Expand Down
2 changes: 0 additions & 2 deletions e2e/jest.e2e.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('../tsconfig');

module.exports = {
maxWorkers: 1,
bail: 1,
setupFilesAfterEnv: ['./init.js'],
testEnvironment: './environment',

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
"clean:packager": "watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-map-*",
"clean:node": "rm -rf node_modules",
"nuke": "./scripts/nuke.sh",
"detox:android": "detox build -c android.emu.debug && detox test -R 1 -c android.emu.debug --loglevel verbose",
"detox:android:release": "detox build -c android.emu.release && detox test -R 1 -c android.emu.release",
"detox:ios": "detox build -c ios.sim.debug | xcpretty --color && detox test -R 1 -c ios.sim.debug --bail",
"detox:ios:release": "detox build -c ios.sim.release && detox test -R 1 -c ios.sim.release --bail",
"detox:android": "detox build -c android.emu.debug && detox test -c android.emu.debug --loglevel verbose",
"detox:android:release": "detox build -c android.emu.release && detox test -c android.emu.release",
"detox:ios:tests": "detox test -c ios.sim.debug --maxWorkers 2 -- --bail 1",
"detox:ios": "detox build -c ios.sim.debug | xcpretty --color && yarn detox:ios:tests",
"detox:ios:release": "detox build -c ios.sim.release && detox test -c ios.sim.release --maxWorkers 2 -- --bail 1",
"ds:install": "yarn install --cwd src/design-system/docs",
"ds": "cd src/design-system/docs && yarn dev",
"fast": "yarn setup && yarn install-pods-fast",
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-retry-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ count=0

until (( count >= max_retries ))
do
./node_modules/.bin/detox test --configuration ios.sim.release --forceExit
./node_modules/.bin/detox test -c ios.sim.release --maxWorkers 2 -- --forceExit --bail 1
ret_val=$?
if [ $ret_val -eq 0 ]; then
exit 0
Expand Down

0 comments on commit a510759

Please sign in to comment.