forked from MetaMask/metamask-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.detoxrc.js
112 lines (107 loc) · 2.77 KB
/
.detoxrc.js
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const { execSync } = require('child_process');
const getAvailableAVDs = (() => {
try {
// Run the command to list available AVDs
const outputList = execSync("emulator -list-avds").toString();
// Parse the output and return an array of AVD names
const avdNames = outputList.trim().split("\n");
// return avdNames
return avdNames;
} catch (error) {
console.error(
"Revisit the command to get the error list. It seems incorrect:",
error.message,
);
return [];
}
})();
module.exports = {
testRunner: {
args: {
$0: 'jest',
config: 'e2e/jest.e2e.config.js',
},
jest: {
setupTimeout: 220000,
},
retries: 1,
},
artifacts: {
rootDir: "./artifacts/screenshots",
plugins: {
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
takeWhen: {
testStart: false,
testDone: false,
}
},
},
},
configurations: {
'ios.sim.debug': {
device: 'ios.simulator',
app: 'ios.debug',
},
'ios.sim.release': {
device: 'ios.simulator',
app: 'ios.release',
},
'android.emu.debug': {
device: 'android.emulator',
app: 'android.debug',
},
'android.emu.release': {
device: 'android.emulator',
app: 'android.release',
},
'android.emu.release.qa': {
device: 'android.emulator',
app: 'android.qa',
},
},
devices: {
'ios.simulator': {
type: 'ios.simulator',
device: {
type: 'iPhone 13 Pro',
},
},
'android.emulator': {
type: 'android.emulator',
device: {
avdName: getAvailableAVDs[0],
},
},
},
apps: {
'ios.debug': {
type: 'ios.app',
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/MetaMask.app',
build: 'yarn start:ios:e2e',
},
'ios.release': {
type: 'ios.app',
binaryPath:
'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:release:e2e",
},
'android.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk',
build: 'yarn start:android:e2e',
},
'android.release': {
type: 'android.apk',
binaryPath:
'android/app/build/outputs/apk/prod/release/app-prod-release.apk',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:release:e2e",
},
'android.qa': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/qa/release/app-qa-release.apk',
build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:android:qa:e2e",
},
},
};