-
Notifications
You must be signed in to change notification settings - Fork 0
/
detox.config.cjs
88 lines (84 loc) · 2.48 KB
/
detox.config.cjs
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
testRunner: {
$0: 'jest',
args: {
config: './e2e/jest.config.cjs',
_: ['e2e'],
},
},
behavior: {
init: {
exposeGlobals: false,
},
},
apps: {
ios: {
type: 'ios.app',
// Run xcodebuild and exit with non-zero if the build fails
build:
'xcodebuild -workspace ios/hotlineblingcodealong.xcworkspace -scheme hotlineblingcodealong -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -arch x86_64 -UseModernBuildSystem=YES | npx excpretty ./',
binaryPath:
'ios/build/Build/Products/Release-iphonesimulator/hotlineblingcodealong.app',
// FIXME: As of April 2022, EAS builds (both local and cloud)
// do not work with Detox
// build:
// 'eas build --platform ios --profile simulator --non-interactive --local --output=e2e/bin/hotlineblingcodealong.app',
// binaryPath: './e2e/bin/hotlineblingcodealong.app',
},
android: {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
build:
// List out the path to the final APK to trigger a failure of the
// action step as well, in case the Gradle build fails
//
// Gradle has failed before here without causing the action step
// to also fail
'pushd android; ./gradlew app:assembleRelease app:assembleAndroidTest -DtestBuildType=release; popd; ls android/app/build/outputs/apk/release/app-release.apk',
// FIXME: As of April 2022, EAS builds (both local and cloud)
// do not work with Detox
// build:
// 'eas build --platform=android --profile emulator --non-interactive --local --output=e2e/bin/app-test.apk',
// binaryPath: 'e2e/app.apk',
},
},
devices: {
simulator: {
type: 'ios.simulator',
device: {
type: 'iPhone 14 Pro',
},
},
emulator: {
type: 'android.emulator',
device: {
avdName: 'Pixel_3a_API_30_AOSP',
},
},
},
configurations: {
ios: {
device: 'simulator',
app: 'ios',
},
android: {
device: 'emulator',
app: 'android',
},
},
artifacts: {
rootDir: '.detoxArtifacts',
plugins: {
log: { enabled: true },
uiHierarchy: 'enabled',
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
takeWhen: {
testStart: false,
testDone: true,
},
},
},
},
};