Skip to content

Commit b42b148

Browse files
committed
match detox to ci avd
1 parent b47f450 commit b42b148

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

examples/E2E/.detoxrc.js

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,97 +2,101 @@
22
module.exports = {
33
testRunner: {
44
args: {
5-
'$0': 'jest',
5+
$0: 'jest',
66
config: 'e2e/jest.config.js',
77
forceExit: process.env.CI ? true : undefined,
88
},
99
jest: {
10-
setupTimeout: 240000
10+
setupTimeout: 240000,
1111
},
1212
detached: !!process.env.CI,
13-
retries: 3
13+
retries: 3,
1414
},
1515
behavior: {
16-
init: {
17-
reinstallApp: true,
18-
exposeGlobals: false
19-
},
20-
launchApp: "auto",
21-
cleanup: {
22-
shutdownDevice: false
23-
}
16+
init: {
17+
reinstallApp: true,
18+
exposeGlobals: false,
19+
},
20+
launchApp: 'auto',
21+
cleanup: {
22+
shutdownDevice: false,
23+
},
2424
},
2525
apps: {
2626
'ios.debug': {
2727
type: 'ios.app',
28-
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/AnalyticsReactNativeE2E.app',
29-
build: 'xcodebuild -workspace ios/AnalyticsReactNativeE2E.xcworkspace -scheme AnalyticsReactNativeE2E -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build'
28+
binaryPath:
29+
'ios/build/Build/Products/Debug-iphonesimulator/AnalyticsReactNativeE2E.app',
30+
build:
31+
'xcodebuild -workspace ios/AnalyticsReactNativeE2E.xcworkspace -scheme AnalyticsReactNativeE2E -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',
3032
},
3133
'ios.release': {
3234
type: 'ios.app',
33-
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/AnalyticsReactNativeE2E.app',
34-
build: 'xcodebuild -workspace ios/AnalyticsReactNativeE2E.xcworkspace -scheme AnalyticsReactNativeE2E -configuration Release -sdk iphonesimulator -derivedDataPath ios/build'
35+
binaryPath:
36+
'ios/build/Build/Products/Release-iphonesimulator/AnalyticsReactNativeE2E.app',
37+
build:
38+
'xcodebuild -workspace ios/AnalyticsReactNativeE2E.xcworkspace -scheme AnalyticsReactNativeE2E -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',
3539
},
3640
'android.debug': {
3741
type: 'android.apk',
3842
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
39-
build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
40-
reversePorts: [
41-
8081
42-
]
43+
build:
44+
'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
45+
reversePorts: [8081],
4346
},
4447
'android.release': {
4548
type: 'android.apk',
4649
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
47-
build: 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release'
48-
}
50+
build:
51+
'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release',
52+
},
4953
},
5054
devices: {
5155
simulator: {
5256
type: 'ios.simulator',
5357
device: {
54-
type: 'iPhone 17'
55-
}
58+
type: 'iPhone 17',
59+
},
5660
},
5761
attached: {
5862
type: 'android.attached',
5963
device: {
6064
adbName: '.*',
61-
disablePermissions: true
62-
}
65+
disablePermissions: true,
66+
},
6367
},
6468
emulator: {
6569
type: 'android.emulator',
6670
device: {
67-
avdName: process.env.CI ? 'Pixel_3a_API_30' : 'Medium_Phone_API_36.1',
68-
disablePermissions: true
69-
}
70-
}
71+
avdName: process.env.CI ? 'Pixel_API_21_AOSP' : 'Medium_Phone_API_36.1',
72+
disablePermissions: true,
73+
},
74+
},
7175
},
7276
configurations: {
7377
'ios.sim.debug': {
7478
device: 'simulator',
75-
app: 'ios.debug'
79+
app: 'ios.debug',
7680
},
7781
'ios.sim.release': {
7882
device: 'simulator',
79-
app: 'ios.release'
83+
app: 'ios.release',
8084
},
8185
'android.att.debug': {
8286
device: 'attached',
83-
app: 'android.debug'
87+
app: 'android.debug',
8488
},
8589
'android.att.release': {
8690
device: 'attached',
87-
app: 'android.release'
91+
app: 'android.release',
8892
},
8993
'android.emu.debug': {
9094
device: 'emulator',
91-
app: 'android.debug'
95+
app: 'android.debug',
9296
},
9397
'android.emu.release': {
9498
device: 'emulator',
95-
app: 'android.release'
96-
}
97-
}
99+
app: 'android.release',
100+
},
101+
},
98102
};

0 commit comments

Comments
 (0)