forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ts
105 lines (88 loc) · 3.39 KB
/
config.ts
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
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- if the first value is '' nullish coalescing will return '' so leaving || for safty
const OUTPUT_DIR = process.env.WORKING_DIRECTORY || './tests/e2e/results';
// add your test name here …
const TEST_NAMES = {
AppStartTime: 'App start time',
OpenChatFinderPage: 'Open chat finder page TTI',
ReportTyping: 'Report typing',
ChatOpening: 'Chat opening',
Linking: 'Linking',
};
/**
* Default config, used by CI by default.
* You can modify these values for your test run by creating a
* separate config file and pass it to the test runner like this:
*
* ```bash
* npm run test:e2e -- --config ./path/to/your/config.js
* ```
*/
export default {
MAIN_APP_PACKAGE: 'com.expensify.chat.e2e',
DELTA_APP_PACKAGE: 'com.expensify.chat.e2edelta',
MAIN_APP_PATH: './app-e2eRelease.apk',
DELTA_APP_PATH: './app-e2edeltaRelease.apk',
ENTRY_FILE: 'src/libs/E2E/reactNativeLaunchingTest.ts',
// The path to the activity within the app that we want to launch.
// Note: even though we have different package _names_, this path doesn't change.
ACTIVITY_PATH: 'com.expensify.chat.MainActivity',
// The port of the testing server that communicates with the app
SERVER_PORT: 4723,
// The amount of times a test should be executed for average performance metrics
RUNS: 60,
DEFAULT_BASELINE_BRANCH: 'main',
OUTPUT_DIR,
// The file to write intermediate results to
OUTPUT_FILE_CURRENT: `${OUTPUT_DIR}/current.json`,
// The file we write logs to
LOG_FILE: `${OUTPUT_DIR}/debug.log`,
// The time in milliseconds after which an operation fails due to timeout
INTERACTION_TIMEOUT: 300000,
// Period we wait between each test runs, to let the device cool down
BOOT_COOL_DOWN: 90 * 1000,
// Period we wait between each test runs, to let the device cool down
SUITE_COOL_DOWN: 10 * 1000,
TEST_NAMES,
/**
* Add your test configurations here. At least,
* you need to add a name for your test.
*
* @type {Object.<string, TestConfig>}
*/
TESTS_CONFIG: {
[TEST_NAMES.AppStartTime]: {
name: TEST_NAMES.AppStartTime,
warmupRuns: 1,
// ... any additional config you might need
},
[TEST_NAMES.OpenChatFinderPage]: {
name: TEST_NAMES.OpenChatFinderPage,
},
// TODO: Fix text and enable again
// [TEST_NAMES.ReportTyping]: {
// name: TEST_NAMES.ReportTyping,
// reportScreen: {
// autoFocus: true,
// },
// // Crowded Policy (Do Not Delete) Report, has a input bar available:
// reportID: '8268282951170052',
// },
[TEST_NAMES.ChatOpening]: {
name: TEST_NAMES.ChatOpening,
// #announce Chat with many messages
reportID: '5421294415618529',
},
// TODO: fix and enable again
// [TEST_NAMES.Linking]: {
// name: TEST_NAMES.Linking,
// reportScreen: {
// autoFocus: true,
// },
// // Crowded Policy (Do Not Delete) Report, has a input bar available:
// reportID: '8268282951170052',
// linkedReportID: '5421294415618529',
// linkedReportActionID: '2845024374735019929',
// },
},
};
export {TEST_NAMES};