forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotractor.conf.js
More file actions
61 lines (50 loc) · 1.75 KB
/
Copy pathprotractor.conf.js
File metadata and controls
61 lines (50 loc) · 1.75 KB
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
const fs = require('fs');
const path = require('path');
// Load ts-node to be able to execute TypeScript files with protractor.
require('ts-node').register({
project: path.join(__dirname, '../e2e/')
});
const E2E_BASE_URL = process.env['E2E_BASE_URL'] || 'http://localhost:4200';
const config = {
useAllAngular2AppRoots: true,
specs: [ path.join(__dirname, '../e2e/**/*.e2e.ts') ],
baseUrl: E2E_BASE_URL,
allScriptsTimeout: 120000,
getPageTimeout: 120000,
jasmineNodeOpts: {
defaultTimeoutInterval: 120000,
},
plugins: [
{
// Runs the axe-core accessibility checks each time the e2e page changes and
// Angular is ready.
path: '../tools/axe-protractor/axe-protractor.js',
rules: [
// Exclude md-menu elements because those are empty if not active.
{ id: 'aria-required-children', selector: '*:not(md-menu)' },
// Disable color constrast checks since the final colors will vary based on the theme.
{ id: 'color-contrast', enabled: false },
]
}
]
};
if (process.env['TRAVIS']) {
const key = require('../scripts/saucelabs/sauce_config');
config.sauceUser = process.env['SAUCE_USERNAME'];
config.sauceKey = key;
config.capabilities = {
'browserName': 'chrome',
'version': 'latest',
"chromedriverVersion": "2.28",
'tunnel-identifier': process.env['TRAVIS_JOB_ID'],
'build': process.env['TRAVIS_JOB_ID'],
'name': 'Material E2E Tests',
// Enables concurrent testing in the Webdriver. Currently runs five e2e files in parallel.
maxInstances: 5,
shardTestFiles: true,
// By default Saucelabs tries to record the whole e2e run. This can slow down the builds.
'recordVideo': false,
'recordScreenshots': false
};
}
exports.config = config;