forked from likeastore/ngDialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor.conf.js
75 lines (64 loc) · 2.04 KB
/
protractor.conf.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
var args = process.argv.slice(2);
var plugins = [];
var useA11y = args.indexOf('--a11y') > -1;
var useConsole = args.indexOf('--console-warning') > -1 || args.indexOf('--console-error') > -1;
if (useA11y) {
plugins.push({
path: 'node_modules/protractor/plugins/accessibility',
chromeA11YDevTools: {
treatWarningsAsFailures: true
}
});
}
if (useConsole) {
plugins.push({
path: 'node_modules/protractor/plugins/console',
failOnWarning: args.indexOf('--console-warning') > -1,
failOnError: args.indexOf('--console-error') > -1
});
}
var multiCapabilities = [{
browserName: 'firefox'
}];
// if (process.env.TRAVIS_PULL_REQUEST === 'false') {
// multiCapabilities.push({
// browserName: 'chrome'
// });
// if (!useA11y) {
// multiCapabilities.push({
// browserName: 'safari'
// });
// }
// if (!useA11y && !useConsole) {
// multiCapabilities.push({
// browserName: 'internet explorer',
// version: 10
// });
// multiCapabilities.push({
// browserName: 'internet explorer',
// version: 11
// });
// }
// multiCapabilities.forEach(function(capability) {
// capability['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
// capability.name = 'ngDialog Protractor ' + process.env.TRAVIS_JOB_NUMBER;
// });
// }
var config = {
allScriptsTimeout: 11000,
specs: ['tests/protractor/**/*.js'],
multiCapabilities: multiCapabilities,
framework: 'jasmine2',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
},
plugins: plugins
};
// if (process.env.TRAVIS_PULL_REQUEST === 'false') {
// config.sauceUser = process.env.SAUCE_USERNAME;
// config.sauceKey = process.env.SAUCE_ACCESS_KEY;
// }
console.log('TRAVIS_PULL_REQUEST', process.env.TRAVIS_PULL_REQUEST);
console.log('protractor config: ', config);
console.log('multiCapabilities: ', multiCapabilities);
module.exports.config = config;