2016-04-01 14:39:01 -07:00
|
|
|
const path = require('path');
|
|
|
|
|
|
2016-05-19 13:20:21 -07:00
|
|
|
// Load ts-node to be able to execute TypeScript files with protractor.
|
|
|
|
|
require('ts-node').register({
|
|
|
|
|
project: path.join(__dirname, '../e2e/')
|
|
|
|
|
});
|
|
|
|
|
|
2016-04-01 14:39:01 -07:00
|
|
|
const E2E_BASE_URL = process.env['E2E_BASE_URL'] || 'http://localhost:4200';
|
2018-08-16 22:54:59 +02:00
|
|
|
|
|
|
|
|
exports.config = {
|
2016-04-01 14:39:01 -07:00
|
|
|
useAllAngular2AppRoots: true,
|
2017-06-10 01:09:08 +02:00
|
|
|
specs: [ path.join(__dirname, '../e2e/**/*.spec.ts') ],
|
2016-06-24 11:34:49 -07:00
|
|
|
baseUrl: E2E_BASE_URL,
|
2016-08-19 10:59:45 -07:00
|
|
|
allScriptsTimeout: 120000,
|
|
|
|
|
getPageTimeout: 120000,
|
2016-07-06 16:37:45 -07:00
|
|
|
jasmineNodeOpts: {
|
2016-08-19 10:59:45 -07:00
|
|
|
defaultTimeoutInterval: 120000,
|
2016-12-13 21:10:31 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
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: [
|
2017-09-28 13:45:03 -07:00
|
|
|
// Exclude mat-menu elements because those are empty if not active.
|
|
|
|
|
{ id: 'aria-required-children', selector: '*:not(mat-menu)' },
|
2016-12-15 11:15:26 -08:00
|
|
|
|
2018-08-16 22:54:59 +02:00
|
|
|
// Disable color contrast checks since the final colors will vary based on the theme.
|
2016-12-15 11:15:26 -08:00
|
|
|
{ id: 'color-contrast', enabled: false },
|
2016-12-13 21:10:31 +01:00
|
|
|
]
|
|
|
|
|
}
|
2018-08-16 22:54:59 +02:00
|
|
|
],
|
2016-04-01 14:39:01 -07:00
|
|
|
|
2018-08-16 22:54:59 +02:00
|
|
|
capabilities: {
|
|
|
|
|
browserName: 'chrome',
|
2018-01-22 18:46:11 +01:00
|
|
|
|
2018-08-20 22:43:04 +02:00
|
|
|
// Enables concurrent testing in the Webdriver. Currently runs three e2e files in parallel.
|
2018-08-16 22:54:59 +02:00
|
|
|
shardTestFiles: true,
|
2018-10-17 20:55:35 +02:00
|
|
|
maxInstances: 5,
|
2018-08-16 22:54:59 +02:00
|
|
|
}
|
|
|
|
|
};
|