2013-08-21 10:16:57 +00:00
|
|
|
module.exports = function(config, specificOptions) {
|
2013-06-25 18:48:10 +00:00
|
|
|
config.set({
|
|
|
|
|
frameworks: ['jasmine'],
|
|
|
|
|
autoWatch: true,
|
|
|
|
|
logLevel: config.LOG_INFO,
|
|
|
|
|
logColors: true,
|
2013-06-25 20:50:45 +00:00
|
|
|
browsers: ['Chrome'],
|
2013-11-19 00:14:09 +00:00
|
|
|
browserDisconnectTimeout: 10000,
|
2013-08-28 20:17:10 +00:00
|
|
|
|
2013-06-25 20:50:45 +00:00
|
|
|
|
|
|
|
|
// config for Travis CI
|
|
|
|
|
sauceLabs: {
|
2013-08-21 10:16:57 +00:00
|
|
|
testName: specificOptions.testName || 'AngularJS',
|
2013-06-25 20:50:45 +00:00
|
|
|
startConnect: false,
|
|
|
|
|
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
|
|
|
|
|
},
|
|
|
|
|
|
2013-08-21 10:16:57 +00:00
|
|
|
// For more browsers on Sauce Labs see:
|
|
|
|
|
// https://saucelabs.com/docs/platforms/webdriver
|
2013-06-25 20:50:45 +00:00
|
|
|
customLaunchers: {
|
|
|
|
|
'SL_Chrome': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'chrome'
|
2013-08-20 21:43:15 +00:00
|
|
|
},
|
|
|
|
|
'SL_Firefox': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'firefox'
|
|
|
|
|
},
|
|
|
|
|
'SL_Safari': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'safari',
|
|
|
|
|
platform: 'Mac 10.8',
|
|
|
|
|
version: '6'
|
|
|
|
|
},
|
|
|
|
|
'SL_IE_8': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'internet explorer',
|
|
|
|
|
platform: 'Windows 7',
|
|
|
|
|
version: '8'
|
|
|
|
|
},
|
|
|
|
|
'SL_IE_9': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'internet explorer',
|
|
|
|
|
platform: 'Windows 2008',
|
|
|
|
|
version: '9'
|
|
|
|
|
},
|
|
|
|
|
'SL_IE_10': {
|
|
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'internet explorer',
|
|
|
|
|
platform: 'Windows 2012',
|
|
|
|
|
version: '10'
|
2013-06-25 20:50:45 +00:00
|
|
|
}
|
|
|
|
|
}
|
2013-06-25 18:48:10 +00:00
|
|
|
});
|
2013-08-21 07:59:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if (process.env.TRAVIS) {
|
2013-08-21 10:16:57 +00:00
|
|
|
// TODO(vojta): remove once SauceLabs supports websockets.
|
|
|
|
|
// This speeds up the capturing a bit, as browsers don't even try to use websocket.
|
2013-08-21 07:59:45 +00:00
|
|
|
config.transports = ['xhr-polling'];
|
2013-08-21 10:16:57 +00:00
|
|
|
|
|
|
|
|
// Debug logging into a file, that we print out at the end of the build.
|
|
|
|
|
config.loggers.push({
|
|
|
|
|
type: 'file',
|
|
|
|
|
filename: process.env.LOGS_DIR + '/' + (specificOptions.logFile || 'karma.log'),
|
|
|
|
|
level: config.LOG_DEBUG
|
|
|
|
|
});
|
2013-08-21 07:59:45 +00:00
|
|
|
}
|
2013-06-25 18:48:10 +00:00
|
|
|
};
|