2019-04-25 15:06:40 +00:00
|
|
|
// @ts-check
|
2017-01-27 08:20:51 +00:00
|
|
|
// Protractor configuration file, see link for more information
|
|
|
|
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
|
|
|
|
2020-05-05 12:28:48 +00:00
|
|
|
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
|
2022-05-10 16:51:53 +00:00
|
|
|
const path = require('path')
|
2022-10-06 19:19:19 +00:00
|
|
|
const {getAdjustedChromeBinPathForWindows} = require('../../tools/windows-chromium-path');
|
2022-06-17 17:44:16 +00:00
|
|
|
|
2022-10-06 19:19:19 +00:00
|
|
|
process.env.CHROME_BIN = getAdjustedChromeBinPathForWindows();
|
2022-06-17 17:44:16 +00:00
|
|
|
|
2019-04-25 15:06:40 +00:00
|
|
|
/**
|
|
|
|
|
* @type { import("protractor").Config }
|
|
|
|
|
*/
|
2017-01-27 08:20:51 +00:00
|
|
|
exports.config = {
|
|
|
|
|
allScriptsTimeout: 11000,
|
|
|
|
|
specs: [
|
2019-04-25 15:06:40 +00:00
|
|
|
'./src/**/*.e2e-spec.ts'
|
2017-01-27 08:20:51 +00:00
|
|
|
],
|
2022-05-10 16:51:53 +00:00
|
|
|
chromeDriver: path.resolve(process.env.CHROMEDRIVER_BIN),
|
2017-01-27 08:20:51 +00:00
|
|
|
capabilities: {
|
2017-02-03 15:44:34 +00:00
|
|
|
browserName: 'chrome',
|
2020-02-13 14:46:38 +00:00
|
|
|
chromeOptions: {
|
2022-05-10 16:51:53 +00:00
|
|
|
binary: path.resolve(process.env.CHROME_BIN),
|
2020-02-07 11:38:58 +00:00
|
|
|
// See /integration/README.md#browser-tests for more info on these args
|
2020-02-13 14:46:38 +00:00
|
|
|
args: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'],
|
|
|
|
|
},
|
2017-01-27 08:20:51 +00:00
|
|
|
},
|
|
|
|
|
directConnect: true,
|
2020-11-30 21:46:14 +00:00
|
|
|
// Keep the Selenium Promise Manager enabled to avoid flakiness on CI.
|
|
|
|
|
// See https://github.com/angular/angular/issues/39872 for more details.
|
|
|
|
|
//
|
|
|
|
|
// TODO(gkalpak): Set this back to `false` to align with CLI-generated apps when the flakiness is
|
|
|
|
|
// fixed in the future.
|
|
|
|
|
SELENIUM_PROMISE_MANAGER: true,
|
2017-01-27 08:20:51 +00:00
|
|
|
baseUrl: 'http://localhost:4200/',
|
2017-02-03 15:44:34 +00:00
|
|
|
framework: 'jasmine',
|
2017-01-27 08:20:51 +00:00
|
|
|
jasmineNodeOpts: {
|
|
|
|
|
showColors: true,
|
|
|
|
|
defaultTimeoutInterval: 30000,
|
|
|
|
|
print: function() {}
|
|
|
|
|
},
|
2019-04-25 15:06:40 +00:00
|
|
|
onPrepare() {
|
2017-01-27 08:20:51 +00:00
|
|
|
require('ts-node').register({
|
2019-04-25 15:06:40 +00:00
|
|
|
project: require('path').join(__dirname, './tsconfig.json')
|
2017-01-27 08:20:51 +00:00
|
|
|
});
|
2020-05-05 12:28:48 +00:00
|
|
|
jasmine.getEnv().addReporter(new SpecReporter({
|
|
|
|
|
spec: {
|
|
|
|
|
displayStacktrace: StacktraceOption.PRETTY,
|
|
|
|
|
},
|
|
|
|
|
}));
|
2017-01-27 08:20:51 +00:00
|
|
|
}
|
|
|
|
|
};
|