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": [
|
"styles": [
|
||||||
"src/styles.css"
|
"src/styles.css"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [],
|
||||||
|
"progress": false
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@ -70,6 +71,13 @@
|
|||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "ivy-trusted-types:build: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": [
|
"styles": [
|
||||||
"src/styles.css"
|
"src/styles.css"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [],
|
||||||
|
"progress": false,
|
||||||
|
"watch": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@ -113,11 +123,18 @@
|
|||||||
"builder": "@angular-devkit/build-angular:protractor",
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
"options": {
|
"options": {
|
||||||
"protractorConfig": "e2e/protractor.conf.js",
|
"protractorConfig": "e2e/protractor.conf.js",
|
||||||
"devServerTarget": "ivy-trusted-types:serve"
|
"devServerTarget": "ivy-trusted-types:serve",
|
||||||
|
"webdriverUpdate": false
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"devServerTarget": "ivy-trusted-types:serve: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'
|
'./src/**/*.e2e-spec.ts'
|
||||||
],
|
],
|
||||||
capabilities: {
|
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,
|
directConnect: true,
|
||||||
SELENIUM_PROMISE_MANAGER: false,
|
SELENIUM_PROMISE_MANAGER: false,
|
||||||
@ -34,4 +39,4 @@ exports.config = {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// 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({
|
config.set({
|
||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
@ -28,7 +33,17 @@ module.exports = function (config) {
|
|||||||
colors: true,
|
colors: true,
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
autoWatch: true,
|
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,
|
singleRun: false,
|
||||||
restartOnFileChange: true
|
restartOnFileChange: true
|
||||||
});
|
});
|
||||||
|
@ -4,42 +4,49 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build --prod",
|
||||||
"test": "ng test",
|
"pretest": "ng version",
|
||||||
|
"test": "ng test && yarn e2e --configuration=ci && yarn e2e --configuration=ci-production",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e --port 0",
|
||||||
|
"postinstall": "ngcc --properties es2015 --create-ivy-entry-points"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~11.0.0-rc.1",
|
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||||
"@angular/common": "~11.0.0-rc.1",
|
"@angular/common": "file:../../dist/packages-dist/common",
|
||||||
"@angular/compiler": "~11.0.0-rc.1",
|
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||||
"@angular/core": "~11.0.0-rc.1",
|
"@angular/core": "file:../../dist/packages-dist/core",
|
||||||
"@angular/forms": "~11.0.0-rc.1",
|
"@angular/forms": "file:../../dist/packages-dist/forms",
|
||||||
"@angular/platform-browser": "~11.0.0-rc.1",
|
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||||
"@angular/platform-browser-dynamic": "~11.0.0-rc.1",
|
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
|
||||||
"@angular/router": "~11.0.0-rc.1",
|
"@angular/router": "file:../../dist/packages-dist/router",
|
||||||
"rxjs": "~6.6.0",
|
"rxjs": "file:../../node_modules/rxjs",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "file:../../node_modules/tslib",
|
||||||
"zone.js": "~0.10.2"
|
"zone.js": "file:../../dist/zone.js-dist/archive/zone.js.tgz"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.1100.0-rc.1",
|
"@angular-devkit/build-angular": "file:../../node_modules/@angular-devkit/build-angular",
|
||||||
"@angular/cli": "~11.0.0-rc.1",
|
"@angular/cli": "file:../../node_modules/@angular/cli",
|
||||||
"@angular/compiler-cli": "~11.0.0-rc.1",
|
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "file:../../node_modules/@types/jasmine",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "file:../../node_modules/@types/node",
|
||||||
"codelyzer": "^6.0.0",
|
"codelyzer": "6.0.1",
|
||||||
"jasmine-core": "~3.6.0",
|
"jasmine-core": "3.6.0",
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
"jasmine-spec-reporter": "5.0.2",
|
||||||
"karma": "~5.2.0",
|
"karma": "5.2.3",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-coverage": "~2.0.3",
|
"karma-coverage": "2.0.3",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "4.0.1",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "1.5.4",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "file:../../node_modules/protractor",
|
||||||
"ts-node": "~8.3.0",
|
"puppeteer": "file:../../node_modules/puppeteer",
|
||||||
"tslint": "~6.1.0",
|
"ts-node": "8.3.0",
|
||||||
"typescript": "~4.0.2"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
9116
integration/ivy-trusted-types/yarn.lock
Normal file
9116
integration/ivy-trusted-types/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user