-
Notifications
You must be signed in to change notification settings - Fork 20
/
karma.browserstack.js
83 lines (75 loc) · 2.2 KB
/
karma.browserstack.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
// Karma configuration
const { short } = require('git-rev-sync');
const getGlobalConfig = require('./karma.global');
const packageJson = require('./package.json');
module.exports = (config) => {
/**
* @see https://www.browserstack.com/automate/capabilities
*/
const customLaunchers = {
bs_chrome_mac: {
base: 'BrowserStack',
browser: 'Chrome',
browser_version: '118.0',
os: 'OS X',
os_version: 'Sonoma',
local: 'false',
networkLogs: 'true',
seleniumVersion: '4.15.0',
},
bs_safari_mac: {
base: 'BrowserStack',
browser: 'Safari',
browser_version: '17.0',
os: 'OS X',
os_version: 'Sonoma',
local: 'false',
networkLogs: 'true',
seleniumVersion: '4.15.0',
},
// TODO: https://github.com/transcend-io/penumbra/issues/249
// bs_firefox_pc: {
// base: 'BrowserStack',
// browser: 'Firefox',
// browser_version: '102.0',
// os: 'Windows',
// os_version: '10',
// },
bs_edge_pc: {
base: 'BrowserStack',
browser: 'Edge',
browser_version: '118.0',
os: 'Windows',
os_version: '11',
local: 'false',
networkLogs: 'true',
seleniumVersion: '4.15.0',
},
};
const globalConfig = getGlobalConfig(config);
config.set({
...globalConfig,
captureTimeout: 400000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 400000,
browserNoActivityTimeout: 400000,
// global config of your BrowserStack account
browserStack: {
username: 'benjaminbrook3',
project: 'Penumbra',
video: true,
build: `penumbra@${packageJson.version} - ${short()} - ${
process.env.GITHUB_RUN_ID ? `CI: ${process.env.GITHUB_RUN_ID}` : 'Local'
}`,
// TODO - https://github.com/transcend-io/penumbra/issues/249
// // A secure context must be used for `crypto.subtle` to be defined
// acceptInsecureCerts: 'true',
// acceptSslCerts: 'true',
},
// define browsers
customLaunchers,
browsers: Object.keys(customLaunchers),
reporters: [...globalConfig.reporters, 'BrowserStack'],
plugins: [...globalConfig.plugins, 'karma-browserstack-launcher'],
});
};