mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Switches the integration tests form Puppeteer/webdriver-manager to the Bazel-managed Chromium/Chromedriver. This is now possible with the new integration test rule for which we can consult the `dev-infra/bazel/browsers` toolchain and setup environment variables. This has been configured already in a previous commit. This commit also includes some additional small cleanups necessary for the new integration test rule: * The `test.sh` scripts have been renamed as they would conflict with the `test.sh` scripts generated by the integration test rule. Previously this was not an issue because tests were declared at a higher-level. As mentioned though this has other downsides and it is trivial to rename the file. * Related to the point above, since tests are now declared witin the actual test folder (for perf e.g.), `package.json` files setting `"type": "module"` will accidentally cause the `nodejs_test`-generated files to be considered ESM. This is not correct and likely needs to be fixed upstream in `rules_nodejs` where explicit `.cjs` extensions should be used. This is only happening **once** in the `injectable-def` test so it is acceptable doing that for now. PR Close #44238
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
// @ts-check
|
|
// Protractor configuration file, see link for more information
|
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
|
|
|
/**
|
|
* @type { import("protractor").Config }
|
|
*/
|
|
exports.config = {
|
|
allScriptsTimeout: 11000,
|
|
specs: [
|
|
'./src/**/*.e2e-spec.ts'
|
|
],
|
|
chromeDriver: process.env.CHROMEDRIVER_BIN,
|
|
capabilities: {
|
|
browserName: 'chrome',
|
|
chromeOptions: {
|
|
binary: process.env.CHROME_BIN,
|
|
// See /integration/README.md#browser-tests for more info on these args
|
|
args: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio']
|
|
},
|
|
},
|
|
directConnect: true,
|
|
baseUrl: 'http://localhost:4200/',
|
|
framework: 'jasmine',
|
|
jasmineNodeOpts: {
|
|
showColors: true,
|
|
defaultTimeoutInterval: 30000,
|
|
print: function() {}
|
|
},
|
|
onPrepare() {
|
|
require('ts-node').register({
|
|
project: require('path').join(__dirname, './tsconfig.json')
|
|
});
|
|
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
|
}
|
|
};
|