-
-
Notifications
You must be signed in to change notification settings - Fork 177
Expand file tree
/
Copy path.detoxrc.js
More file actions
68 lines (66 loc) · 2.36 KB
/
Copy path.detoxrc.js
File metadata and controls
68 lines (66 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function shellSingleQuote(value) {
return `'${String(value).replaceAll("'", "'\\''")}'`;
}
const iosSimulatorName =
process.env.HOT_UPDATER_E2E_IOS_SIMULATOR_NAME || "iPhone 16";
const iosDestination = process.env.HOT_UPDATER_E2E_DEVICE_ID
? `id=${process.env.HOT_UPDATER_E2E_DEVICE_ID}`
: `platform=iOS Simulator,name=${iosSimulatorName}`;
const androidArchitectures =
process.env.HOT_UPDATER_E2E_ANDROID_ARCHITECTURES || "arm64-v8a,x86_64";
module.exports = {
testRunner: {
args: {
$0: "jest",
config: "e2e/detox/jest.config.js",
},
jest: {
setupTimeout: 120000,
},
},
apps: {
"ios.release": {
type: "ios.app",
binaryPath:
process.env.HOT_UPDATER_E2E_IOS_BINARY_PATH ||
"examples/v0.85.0/ios/build/Build/Products/Release-iphonesimulator/HotUpdaterExample.app",
build:
`cd examples/v0.85.0/ios && RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 bundle exec pod install && xcodebuild -workspace HotUpdaterExample.xcworkspace -scheme HotUpdaterExample -configuration Release -sdk iphonesimulator -destination ${shellSingleQuote(iosDestination)} -derivedDataPath build -quiet HOT_UPDATER_MIN_BUNDLE_ID=00000000-0000-7000-8000-000000000000`,
},
"android.release": {
type: "android.apk",
binaryPath:
process.env.HOT_UPDATER_E2E_ANDROID_BINARY_PATH ||
"examples/v0.85.0/android/app/build/outputs/apk/release/app-release.apk",
testBinaryPath:
process.env.HOT_UPDATER_E2E_ANDROID_TEST_BINARY_PATH ||
"examples/v0.85.0/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk",
build:
`cd examples/v0.85.0/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -PreactNativeArchitectures=${androidArchitectures} -PHOT_UPDATER_E2E_DEBUGGABLE=true -PMIN_BUNDLE_ID=00000000-0000-7000-8000-000000000000`,
},
},
devices: {
simulator: {
type: "ios.simulator",
device: {
type: iosSimulatorName,
},
},
androidAttached: {
type: "android.attached",
device: {
adbName: process.env.HOT_UPDATER_E2E_ANDROID_SERIAL || ".*",
},
},
},
configurations: {
"ios.sim.release": {
device: "simulator",
app: "ios.release",
},
"android.emu.release": {
device: "androidAttached",
app: "android.release",
},
},
};