test(core): make ivy-trusted-types similar to other integration tests (#39614)
- @angular dependencies point to ../../dist - use absolute versions for other dependencies - add a yarn.lock - create ci-specific targets - make karma and protractor use correct Chrome binary PR Close #39614
This commit is contained in:
parent
fc0ee5be5f
commit
6e1708a2eb
|
@ -30,7 +30,8 @@
|
|||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
"scripts": [],
|
||||
"progress": false
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
|
@ -70,6 +71,13 @@
|
|||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ivy-trusted-types:build:production"
|
||||
},
|
||||
"ci": {
|
||||
"progress": false
|
||||
},
|
||||
"ci-production": {
|
||||
"browserTarget": "ivy-trusted-types:build:production",
|
||||
"progress": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -93,7 +101,9 @@
|
|||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
"scripts": [],
|
||||
"progress": false,
|
||||
"watch": false
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
@ -113,11 +123,18 @@
|
|||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "ivy-trusted-types:serve"
|
||||
"devServerTarget": "ivy-trusted-types:serve",
|
||||
"webdriverUpdate": false
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "ivy-trusted-types:serve:production"
|
||||
},
|
||||
"ci": {
|
||||
"devServerTarget": "ivy-trusted-types:serve:ci"
|
||||
},
|
||||
"ci-production": {
|
||||
"devServerTarget": "ivy-trusted-types:serve:ci-production"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,12 @@ exports.config = {
|
|||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
browserName: 'chrome'
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
binary: require('puppeteer').executablePath(),
|
||||
// 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,
|
||||
SELENIUM_PROMISE_MANAGER: false,
|
||||
|
@ -34,4 +39,4 @@ exports.config = {
|
|||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
// Env var CHROME_BIN is later picked up by karma-chrome-launcher that is triggered by
|
||||
// `browsers: ['ChromeHeadlessNoSandbox']` below.
|
||||
// See https://github.com/karma-runner/karma-chrome-launcher#usage for more info.
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
|
@ -28,7 +33,17 @@ module.exports = function (config) {
|
|||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
// See /integration/README.md#browser-tests for more info on these args
|
||||
flags: [
|
||||
'--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage',
|
||||
'--hide-scrollbars', '--mute-audio'
|
||||
]
|
||||
}
|
||||
},
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
|
|
|
@ -4,42 +4,49 @@
|
|||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"build": "ng build --prod",
|
||||
"pretest": "ng version",
|
||||
"test": "ng test && yarn e2e --configuration=ci && yarn e2e --configuration=ci-production",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
"e2e": "ng e2e --port 0",
|
||||
"postinstall": "ngcc --properties es2015 --create-ivy-entry-points"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~11.0.0-rc.1",
|
||||
"@angular/common": "~11.0.0-rc.1",
|
||||
"@angular/compiler": "~11.0.0-rc.1",
|
||||
"@angular/core": "~11.0.0-rc.1",
|
||||
"@angular/forms": "~11.0.0-rc.1",
|
||||
"@angular/platform-browser": "~11.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "~11.0.0-rc.1",
|
||||
"@angular/router": "~11.0.0-rc.1",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.2"
|
||||
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||
"@angular/common": "file:../../dist/packages-dist/common",
|
||||
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||
"@angular/core": "file:../../dist/packages-dist/core",
|
||||
"@angular/forms": "file:../../dist/packages-dist/forms",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
|
||||
"@angular/router": "file:../../dist/packages-dist/router",
|
||||
"rxjs": "file:../../node_modules/rxjs",
|
||||
"tslib": "file:../../node_modules/tslib",
|
||||
"zone.js": "file:../../dist/zone.js-dist/archive/zone.js.tgz"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.1100.0-rc.1",
|
||||
"@angular/cli": "~11.0.0-rc.1",
|
||||
"@angular/compiler-cli": "~11.0.0-rc.1",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.6.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~5.2.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.0.2"
|
||||
"@angular-devkit/build-angular": "file:../../node_modules/@angular-devkit/build-angular",
|
||||
"@angular/cli": "file:../../node_modules/@angular/cli",
|
||||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||
"@types/jasmine": "file:../../node_modules/@types/jasmine",
|
||||
"@types/node": "file:../../node_modules/@types/node",
|
||||
"codelyzer": "6.0.1",
|
||||
"jasmine-core": "3.6.0",
|
||||
"jasmine-spec-reporter": "5.0.2",
|
||||
"karma": "5.2.3",
|
||||
"karma-chrome-launcher": "3.1.0",
|
||||
"karma-coverage": "2.0.3",
|
||||
"karma-jasmine": "4.0.1",
|
||||
"karma-jasmine-html-reporter": "1.5.4",
|
||||
"protractor": "file:../../node_modules/protractor",
|
||||
"puppeteer": "file:../../node_modules/puppeteer",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "6.1.3",
|
||||
"typescript": "file:../../node_modules/typescript"
|
||||
},
|
||||
"//resolutions-comment": "Ensure a single version of webdriver-manager which comes from root node_modules that has already run webdriver-manager update",
|
||||
"resolutions": {
|
||||
"**/webdriver-manager": "file:../../node_modules/webdriver-manager"
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue