build: run e2e tests with bazel (#14656)

* Builds the e2e app with Bazel
* Serves the e2e app with Bazel
* Runs the e2e tests with Bazel protractor rules
This commit is contained in:
Paul Gschwendtner
2019-01-11 23:43:04 +01:00
committed by Andrew Seguin
parent 5d86a1fe09
commit 326f8bb32f
42 changed files with 545 additions and 714 deletions
-47
View File
@@ -1,47 +0,0 @@
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';
exports.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 contrast checks since the final colors will vary based on the theme.
{ id: 'color-contrast', enabled: false },
]
}
],
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [ '--headless', '--window-size=1024,768']
},
// Enables concurrent testing in the Webdriver. Currently runs three e2e files in parallel.
shardTestFiles: true,
maxInstances: 5,
}
};