2015-11-19 04:01:05 +08:00
|
|
|
var assign = require('object-assign')
|
|
|
|
var base = require('./karma.base.config.js')
|
2014-09-26 13:26:23 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Having too many tests running concurrently on saucelabs
|
|
|
|
* causes timeouts and errors, so we have to run them in
|
|
|
|
* smaller batches.
|
|
|
|
*/
|
|
|
|
|
|
|
|
var batches = [
|
|
|
|
// the cool kids
|
|
|
|
{
|
|
|
|
sl_chrome: {
|
|
|
|
base: 'SauceLabs',
|
|
|
|
browserName: 'chrome',
|
2015-06-14 15:34:18 +08:00
|
|
|
platform: 'Windows 7'
|
2014-09-26 13:26:23 +08:00
|
|
|
},
|
|
|
|
sl_firefox: {
|
|
|
|
base: 'SauceLabs',
|
2015-06-14 15:34:18 +08:00
|
|
|
browserName: 'firefox'
|
2014-09-26 13:26:23 +08:00
|
|
|
},
|
|
|
|
sl_mac_safari: {
|
|
|
|
base: 'SauceLabs',
|
2015-07-02 20:59:11 +08:00
|
|
|
browserName: 'safari',
|
|
|
|
platform: 'OS X 10.10'
|
2014-09-26 13:26:23 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
// ie family
|
|
|
|
{
|
|
|
|
sl_ie_9: {
|
|
|
|
base: 'SauceLabs',
|
2015-07-02 20:59:11 +08:00
|
|
|
browserName: 'internet explorer',
|
|
|
|
platform: 'Windows 7',
|
|
|
|
version: '9'
|
2014-09-26 13:26:23 +08:00
|
|
|
},
|
|
|
|
sl_ie_10: {
|
|
|
|
base: 'SauceLabs',
|
2015-07-02 20:59:11 +08:00
|
|
|
browserName: 'internet explorer',
|
|
|
|
platform: 'Windows 8',
|
|
|
|
version: '10'
|
2014-09-26 13:26:23 +08:00
|
|
|
},
|
|
|
|
sl_ie_11: {
|
|
|
|
base: 'SauceLabs',
|
|
|
|
browserName: 'internet explorer',
|
|
|
|
platform: 'Windows 8.1',
|
|
|
|
version: '11'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// mobile
|
|
|
|
{
|
|
|
|
sl_ios_safari: {
|
|
|
|
base: 'SauceLabs',
|
|
|
|
browserName: 'iphone',
|
|
|
|
platform: 'OS X 10.9',
|
2015-06-14 15:34:18 +08:00
|
|
|
version: '7.1'
|
2014-09-26 13:26:23 +08:00
|
|
|
},
|
|
|
|
sl_android: {
|
|
|
|
base: 'SauceLabs',
|
|
|
|
browserName: 'android',
|
|
|
|
platform: 'Linux',
|
2014-09-27 09:17:03 +08:00
|
|
|
version: '4.2'
|
2014-09-26 13:26:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2015-11-19 04:01:05 +08:00
|
|
|
module.exports = function (config) {
|
|
|
|
var batch = batches[process.argv[4] || 0]
|
|
|
|
|
|
|
|
config.set(assign(base, {
|
|
|
|
browsers: Object.keys(batch),
|
|
|
|
customLaunchers: batch,
|
|
|
|
reporters: ['progress', 'saucelabs'],
|
|
|
|
sauceLabs: {
|
|
|
|
testName: 'Vue.js unit tests',
|
|
|
|
recordScreenshots: false,
|
2016-04-21 23:21:59 +08:00
|
|
|
build: process.env.CIRCLE_BUILD_NUM || process.env.SAUCE_BUILD_ID || Date.now()
|
2015-11-19 04:01:05 +08:00
|
|
|
},
|
2014-09-27 09:17:03 +08:00
|
|
|
// mobile emulators are really slow
|
|
|
|
captureTimeout: 300000,
|
2015-11-19 04:01:05 +08:00
|
|
|
browserNoActivityTimeout: 300000
|
|
|
|
}))
|
2015-06-14 15:34:18 +08:00
|
|
|
}
|