forked from Refinitiv/refinitiv-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
browsers.config.js
78 lines (67 loc) · 3.04 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
const osType = require('os').type();
const isWin = osType === 'Windows_NT';
const isDarwin = osType === 'Darwin'; /* macOS, iOS, iPadOS */
// Local browsers
const defaultBrowsers = ['chrome', 'firefox'];
const availableBrowsers = ['chrome', 'firefox', 'opera'];
// do not perform browser check as it is slow and never required
if (isWin) {
availableBrowsers.push('ie');
}
if (isDarwin) {
// defaultBrowsers.push('safari'); /* there is a bug https://github.com/karma-runner/karma-safari-launcher/issues/29, so do not include it by default */
availableBrowsers.push('safari');
}
// BrowserStack browsers
const BrowserStack = {
defaultBrowsers: ['chrome', 'firefox', 'safari'],
supportedBrowsers: [
'chrome', 'firefox', 'safari', 'edge',
'chrome_previous', 'firefox_previous', 'safari_previous', 'edge_previous'
],
availableBrowsers: [
'default', // default browsers alias
'supported', // supported browsers alias
'ios',
'android',
'samsung',
'ios_previous',
'android_previous',
'samsung_previous'
]
};
// Copy supported browsers to available browsers
BrowserStack.availableBrowsers = [
...BrowserStack.supportedBrowsers,
...BrowserStack.availableBrowsers,
];
// BrowserStack Base Config
const defaultDevice = { base: 'BrowserStack', real_mobile: 'true'};
const defaultWindows = { base: 'BrowserStack', os: 'Windows', os_version: '11' };
const defaultOSX = { base: 'BrowserStack', os: 'OS X', os_version: 'Monterey' };
// BrowserStack Browsers Config
BrowserStack.config = {
// Latest versions
chrome: { ...defaultWindows, browser: 'chrome', browser_version: 'latest' },
firefox: { ...defaultWindows, browser: 'firefox', browser_version: 'latest' },
edge: { ...defaultWindows, browser: 'edge', browser_version: 'latest' },
safari: { ...defaultOSX, browser: 'safari' },
// Previous versions
chrome_previous: { ...defaultWindows, browser: 'chrome', browser_version: 'latest-1' },
firefox_previous: { ...defaultWindows, browser: 'firefox', browser_version: 'latest-1' },
edge_previous: { ...defaultWindows, browser: 'edge', browser_version: 'latest-1' },
safari_previous: { ...defaultOSX, browser: 'safari', os_version: 'Big Sur' },
// Mobile Devices
ios: { ...defaultDevice, browser: 'iphone', device : 'iPhone 14', os: 'ios', os_version : '16' },
android: { ...defaultDevice, browser: 'android', device : 'Google Pixel 6', os: 'android', os_version : '12.0' },
samsung: { ...defaultDevice, browser: 'samsung', device : 'Samsung Galaxy S22', os: 'android', os_version : '12.0' },
// Mobile Devices Previous versions
ios_previous: { ...defaultDevice, browser: 'iphone', device : 'iPhone 13', os: 'ios', os_version : '15' },
android_previous: { ...defaultDevice, browser: 'android', device : 'Google Pixel 5', os: 'android', os_version : '11.0' },
samsung_previous: { ...defaultDevice, browser: 'samsung', device : 'Samsung Galaxy S21', os: 'android', os_version : '11.0' }
};
module.exports = {
defaultBrowsers,
availableBrowsers,
BrowserStack
};