2016-08-30 12:29:39 -04:00
|
|
|
// Make sure that the command line is read as the first thing
|
|
|
|
// as this could exit node if the help script should be printed.
|
|
|
|
require('./dist/all/e2e_util/perf_util').readCommandLine();
|
|
|
|
|
|
|
|
var CHROME_OPTIONS = {
|
2016-08-30 17:17:37 -04:00
|
|
|
'args': ['--js-flags=--expose-gc', '--no-sandbox'],
|
2016-08-30 12:29:39 -04:00
|
|
|
'perfLoggingPrefs': {
|
|
|
|
'traceCategories': 'v8,blink.console,devtools.timeline,disabled-by-default-devtools.timeline'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
var BROWSER_CAPS = {
|
|
|
|
LocalChrome: {
|
|
|
|
'browserName': 'chrome',
|
|
|
|
chromeOptions: CHROME_OPTIONS,
|
|
|
|
loggingPrefs: {
|
|
|
|
performance: 'ALL',
|
2016-10-04 17:06:41 -04:00
|
|
|
browser: 'ALL'
|
2016-08-30 12:29:39 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
ChromeOnTravis: {
|
|
|
|
browserName: 'chrome',
|
|
|
|
chromeOptions: mergeInto(CHROME_OPTIONS, {
|
2016-10-04 17:06:41 -04:00
|
|
|
'binary': process.env.CHROME_BIN
|
2016-08-30 12:29:39 -04:00
|
|
|
}),
|
|
|
|
loggingPrefs: {
|
|
|
|
performance: 'ALL',
|
2016-10-04 17:06:41 -04:00
|
|
|
browser: 'ALL'
|
2016-08-30 12:29:39 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.config = {
|
2016-10-04 17:06:41 -04:00
|
|
|
onPrepare: function() {
|
|
|
|
beforeEach(function() {
|
|
|
|
browser.ignoreSynchronization = false;
|
|
|
|
});
|
|
|
|
},
|
2016-08-30 12:29:39 -04:00
|
|
|
restartBrowserBetweenTests: true,
|
|
|
|
allScriptsTimeout: 11000,
|
2016-10-04 17:06:41 -04:00
|
|
|
specs: [
|
|
|
|
'dist/all/**/e2e_test/**/*_perf.js'
|
|
|
|
],
|
2016-08-30 12:29:39 -04:00
|
|
|
capabilities: process.env.TRAVIS ? BROWSER_CAPS.ChromeOnTravis : BROWSER_CAPS.LocalChrome,
|
|
|
|
directConnect: true,
|
|
|
|
baseUrl: 'http://localhost:8000/',
|
|
|
|
framework: 'jasmine2',
|
|
|
|
jasmineNodeOpts: {
|
|
|
|
showColors: true,
|
|
|
|
defaultTimeoutInterval: 60000,
|
2016-10-04 17:06:41 -04:00
|
|
|
print: function(msg) { console.log(msg)}
|
2016-08-30 12:29:39 -04:00
|
|
|
},
|
|
|
|
useAllAngular2AppRoots: true
|
|
|
|
};
|
|
|
|
|
|
|
|
function mergeInto(src, target) {
|
2016-10-04 17:06:41 -04:00
|
|
|
for (var prop in src) {
|
|
|
|
target[prop] = src[prop];
|
|
|
|
}
|
|
|
|
return target;
|
2016-08-30 12:29:39 -04:00
|
|
|
}
|