Files
angular__angular/test/protractor.conf.js
T
Paul Gschwendtner 33afd93198 build: remove chrome sandbox workaround (#9498)
In order to align with the `angular/angular` setup, we also remove the temporary Chrome Headless Sandbox workaround in favor of faster Travis CI containers. To be able to still use headless chrome, we specify the `no-sandbox` flag.

Reference https://github.com/angular/angular/pull/21641
2018-01-22 09:46:11 -08:00

62 lines
1.7 KiB
JavaScript

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/**/*.spec.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 mat-menu elements because those are empty if not active.
{ id: 'aria-required-children', selector: '*:not(mat-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',
'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;