-
Notifications
You must be signed in to change notification settings - Fork 22
/
browsers.config.js
93 lines (84 loc) · 3.14 KB
/
browsers.config.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
// Browsers for local testing with WTR
const DefaultBrowsers = ['chrome', 'firefox', 'safari'];
const DefaultMobileBrowsers = ['android', 'ios'];
// BrowserStack browsers
const BrowserStack = {
defaultBrowsers: DefaultBrowsers,
latestBrowsers: [...DefaultBrowsers, ...DefaultMobileBrowsers],
supportedBrowsers: [
...DefaultBrowsers,
...DefaultMobileBrowsers,
'chrome_minus1',
'chrome_minus2',
'firefox_minus1',
'firefox_minus2',
'android_minus1',
'android_minus2',
'ios_minus1',
'ios_minus2'
],
availableBrowsers: [
'default',
'latest',
'supported', // Alias
'edge',
'edge_minus1',
'edge_minus2',
'safari',
'safari_minus1',
'safari_minus2' // Safari are moved out from default and supported temporary because BrowserStack connection issue
]
};
// Combine supported & aliases into complete available browsers
// CLI param would be validated with this list of browsers
BrowserStack.availableBrowsers = [...BrowserStack.supportedBrowsers, ...BrowserStack.availableBrowsers];
// base platform config
const deviceConfig = { real_mobile: 'true' };
const windowsConfig = { os: 'Windows', os_version: '11' };
const macOSConfig = { os: 'OS X', os_version: 'Sequoia' };
// BrowserStack Browsers Config
BrowserStack.config = {
// Latest versions
chrome: { ...windowsConfig, browser: 'chrome', browser_version: 'latest' },
firefox: { ...windowsConfig, browser: 'firefox', browser_version: 'latest' },
edge: { ...windowsConfig, browser: 'edge', browser_version: 'latest' },
safari: { ...macOSConfig, browser: 'safari' },
// minus1 versions
chrome_minus1: { ...windowsConfig, browser: 'chrome', browser_version: 'latest-1' },
firefox_minus1: { ...windowsConfig, browser: 'firefox', browser_version: 'latest-1' },
edge_minus1: { ...windowsConfig, browser: 'edge', browser_version: 'latest-1' },
safari_minus1: { ...macOSConfig, browser: 'safari', os_version: 'Sonoma' },
// minus2 versions
chrome_minus2: { ...windowsConfig, browser: 'chrome', browser_version: 'latest-2' },
firefox_minus2: { ...windowsConfig, browser: 'firefox', browser_version: 'latest-2' },
edge_minus2: { ...windowsConfig, browser: 'edge', browser_version: 'latest-2' },
safari_minus2: { ...macOSConfig, browser: 'safari', os_version: 'Ventura' },
// Mobile Devices
ios: { ...deviceConfig, browser: 'iphone', device: 'iPhone 16 Pro', os: 'ios', os_version: '18' },
android: {
...deviceConfig,
browser: 'android',
device: 'Samsung Galaxy S24',
os: 'android',
os_version: '14.0'
},
// Mobile Devices minus1 versions
ios_minus1: { ...deviceConfig, browser: 'iphone', device: 'iPhone 15 Pro', os: 'ios', os_version: '17' },
android_minus1: {
...deviceConfig,
browser: 'android',
device: 'Samsung Galaxy S23',
os: 'android',
os_version: '13.0'
},
// Mobile Devices minus2 versions
ios_minus2: { ...deviceConfig, browser: 'iphone', device: 'iPhone 14 Pro', os: 'ios', os_version: '16' },
android_minus2: {
...deviceConfig,
browser: 'android',
device: 'Samsung Galaxy S22',
os: 'android',
os_version: '12.0'
}
};
export { DefaultBrowsers, BrowserStack };