Skip to content

Commit 940f277

Browse files
committed
detox???
1 parent 142348f commit 940f277

File tree

4 files changed

+70
-62
lines changed

4 files changed

+70
-62
lines changed

.detoxrc.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/** @type {Detox.DetoxConfig} */
2+
module.exports = {
3+
testRunner: {
4+
args: {
5+
$0: 'jest',
6+
config: 'example/e2e/config.json',
7+
},
8+
jest: {
9+
setupTimeout: 120000,
10+
},
11+
},
12+
apps: {
13+
'ios.release': {
14+
type: 'ios.app',
15+
binaryPath:
16+
'example/ios/build/Build/Products/Release-iphonesimulator/ReactTestApp.app',
17+
build: 'scripts/ios_e2e.sh build',
18+
},
19+
'android.release': {
20+
type: 'android.apk',
21+
binaryPath:
22+
'example/android/app/build/outputs/apk/release/app-release.apk',
23+
testBinaryPath:
24+
'example/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk',
25+
build: 'scripts/android_e2e.sh build',
26+
},
27+
'android.next.release': {
28+
type: 'android.apk',
29+
binaryPath: 'example/android/app/build/outputs/apk/next/app-next.apk',
30+
testBinaryPath:
31+
'example/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk',
32+
build: 'scripts/android_e2e.sh build',
33+
},
34+
},
35+
devices: {
36+
simulator: {
37+
type: 'ios.simulator',
38+
device: {
39+
type: 'iPhone 14',
40+
},
41+
},
42+
emulator: {
43+
type: 'android.emulator',
44+
device: {
45+
avdName: 'E2E_API_30',
46+
},
47+
},
48+
},
49+
configurations: {
50+
'ios.sim.release': {
51+
device: 'simulator',
52+
app: 'ios.release',
53+
},
54+
'android.emu.release': {
55+
device: 'emulator',
56+
app: 'android.release',
57+
},
58+
'android.next.emu.release': {
59+
device: 'emulator',
60+
app: 'android.next.release',
61+
},
62+
},
63+
};

example/e2e/config.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"testEnvironment": "./environment",
3-
"testRunner": "jest-circus/runner",
2+
"testMatch": ["<rootDir>/**/*.e2e.js"],
43
"testTimeout": 120000,
5-
"testRegex": ".*\\.e2e\\.[jt]sx?",
4+
"maxWorkers": 1,
5+
"globalSetup": "detox/runners/jest/globalSetup",
6+
"globalTeardown": "detox/runners/jest/globalTeardown",
67
"reporters": ["detox/runners/jest/streamlineReporter"],
7-
"setupFilesAfterEnv": ["./jest.setup.js"]
8+
"setupFilesAfterEnv": ["./jest.setup.js"],
9+
"testEnvironment": "detox/runners/jest/testEnvironment",
10+
"verbose": true
811
}

example/e2e/environment.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -106,41 +106,6 @@
106106
"./example/jest.setup.js"
107107
]
108108
},
109-
"detox": {
110-
"test-runner": "jest",
111-
"runner-config": "example/e2e/config.json",
112-
"configurations": {
113-
"ios.sim.release": {
114-
"binaryPath": "example/ios/build/Build/Products/Release-iphonesimulator/ReactTestApp.app",
115-
"type": "ios.simulator",
116-
"device": {
117-
"type": "iPhone 14"
118-
}
119-
},
120-
"android.emu.release": {
121-
"binaryPath": "example/android/app/build/outputs/apk/release/app-release.apk",
122-
"testBinaryPath": "example/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk",
123-
"type": "android.emulator",
124-
"device": {
125-
"avdName": "E2E_API_30",
126-
"utilBinaryPaths": [
127-
"/var/tmp/test-butler.apk"
128-
]
129-
}
130-
},
131-
"android.emu.release.next": {
132-
"binaryPath": "example/android/app/build/outputs/apk/next/app-next.apk",
133-
"testBinaryPath": "example/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk",
134-
"type": "android.emulator",
135-
"device": {
136-
"avdName": "E2E_API_30",
137-
"utilBinaryPaths": [
138-
"/var/tmp/test-butler.apk"
139-
]
140-
}
141-
}
142-
}
143-
},
144109
"eslintConfig": {
145110
"extends": [
146111
"@react-native-community",

0 commit comments

Comments
 (0)