test: update integration/cli-hello-world-ivy-minimal project structure (#33175)

PR Close #33175
This commit is contained in:
Filipe Silva 2019-10-16 13:37:18 +01:00 committed by Matias Niemelä
parent 3ae72dccfb
commit 8e2e1f8340
20 changed files with 196 additions and 229 deletions

View File

@ -14,9 +14,12 @@
"cli-hello-world-ivy-minimal": { "cli-hello-world-ivy-minimal": {
"master": { "master": {
"uncompressed": { "uncompressed": {
"runtime": 1485, "runtime-es2015": 1485,
"main": 14213, "runtime-es5": 1485,
"polyfills": 45482 "main-es2015": 14440,
"main-es5": 14582,
"polyfills-es2015": 36808,
"polyfills-es5": 127675
} }
} }
}, },

View File

@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

View File

@ -1,6 +1,6 @@
# CliHelloWorldIvyMinimal # CliHelloWorldIvyMinimal
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0-rc.0. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.0-next.9.
## Development server ## Development server

View File

@ -1,17 +1,14 @@
{ {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1, "version": 1,
"cli": {
"packageManager": "yarn"
},
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"cli-hello-world-ivy-minimal": { "cli-hello-world-ivy-minimal": {
"projectType": "application",
"schematics": {},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"projectType": "application",
"prefix": "app", "prefix": "app",
"schematics": {},
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
@ -20,7 +17,8 @@
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/assets" "src/assets"
@ -44,7 +42,6 @@
"sourceMap": false, "sourceMap": false,
"extractCss": true, "extractCss": true,
"namedChunks": false, "namedChunks": false,
"aot": true,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
@ -53,6 +50,11 @@
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "2mb",
"maximumError": "5mb" "maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
} }
] ]
} }
@ -87,16 +89,16 @@
"options": { "options": {
"main": "src/test.ts", "main": "src/test.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js", "karmaConfig": "karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/assets" "src/assets"
], ],
"styles": [
"src/styles.css"
],
"scripts": [],
"progress": false, "progress": false,
"watch": false "watch": false
} }
@ -105,21 +107,15 @@
"builder": "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options": { "options": {
"tsConfig": [ "tsConfig": [
"src/tsconfig.app.json", "tsconfig.app.json",
"src/tsconfig.spec.json" "tsconfig.spec.json",
"e2e/tsconfig.json"
], ],
"exclude": [ "exclude": [
"**/node_modules/**" "**/node_modules/**"
] ]
} }
}
}
}, },
"cli-hello-world-ivy-minimal-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": { "e2e": {
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
@ -138,18 +134,8 @@
"devServerTarget": "cli-hello-world-ivy-minimal:serve:ci-production" "devServerTarget": "cli-hello-world-ivy-minimal:serve:ci-production"
} }
} }
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
} }
} }
} }},
}
},
"defaultProject": "cli-hello-world-ivy-minimal" "defaultProject": "cli-hello-world-ivy-minimal"
} }

View File

@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

View File

@ -1,8 +1,12 @@
// @ts-check
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter'); const { SpecReporter } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
specs: [ specs: [
@ -25,7 +29,7 @@ exports.config = {
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json') project: require('path').join(__dirname, './tsconfig.json')
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
} }

View File

@ -1,10 +1,9 @@
import { browser } from 'protractor';
import { AppPage } from './app.po'; import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('cli-hello-world-ivy-minimal App', () => { describe('cli-hello-world-ivy-minimal App', () => {
// Ivy renderComponent apps fail on protractor when waiting for Angular. // Ivy renderComponent apps fail on protractor when waiting for Angular.
browser.waitForAngularEnabled(false); browser.waitForAngularEnabled(false);
let page: AppPage; let page: AppPage;
beforeEach(() => { beforeEach(() => {
@ -15,4 +14,12 @@ describe('cli-hello-world-ivy-minimal App', () => {
page.navigateTo(); page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy-minimal!'); expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy-minimal!');
}); });
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
}); });

View File

@ -1,7 +1,7 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/e2e",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es5",
"types": [ "types": [

View File

@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), dir: require('path').join(__dirname, './coverage/latest-app'),
reports: ['html', 'lcovonly', 'text-summary'], reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },
@ -25,13 +25,8 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['CustomChrome'], browsers: ['Chrome'],
singleRun: false, singleRun: false,
customLaunchers: { restartOnFileChange: true
CustomChrome: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
}); });
}; };

View File

@ -23,7 +23,6 @@
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", "@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../../dist/packages-dist/router", "@angular/router": "file:../../dist/packages-dist/router",
"core-js": "file:../../node_modules/core-js",
"rxjs": "file:../../node_modules/rxjs", "rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib", "tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../node_modules/zone.js" "zone.js": "file:../../node_modules/zone.js"
@ -33,19 +32,19 @@
"@angular/cli": "file:../../node_modules/@angular/cli", "@angular/cli": "file:../../node_modules/@angular/cli",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../../dist/packages-dist/language-service", "@angular/language-service": "file:../../dist/packages-dist/language-service",
"@types/jasmine": "~2.8.8", "@types/jasmine": "~3.4.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "file:../../node_modules/@types/node", "@types/node": "file:../../node_modules/@types/node",
"codelyzer": "~4.5.0", "codelyzer": "^5.1.2",
"jasmine-core": "~2.99.1", "jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1", "karma": "~4.3.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~1.1.2", "karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^1.4.2",
"protractor": "file:../../node_modules/protractor", "protractor": "file:../../node_modules/protractor",
"ts-node": "~7.0.0", "ts-node": "~8.3.0",
"tslint": "~5.18.0", "tslint": "~5.18.0",
"typescript": "file:../../node_modules/typescript" "typescript": "file:../../node_modules/typescript"
} }

View File

@ -1,11 +0,0 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 948 B

View File

@ -18,31 +18,9 @@
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills.
* This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot
*/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`. // import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
/** /**
* Web Animations `@angular/platform-browser/animations` * Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.

View File

@ -1,14 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
],
"angularCompilerOptions": {
"enableIvy": "ngtsc"
}
}

View File

@ -1,18 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}

View File

@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

View File

@ -5,12 +5,12 @@
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"module": "es2015", "downlevelIteration": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true, "importHelpers": true,
"target": "es5", "target": "es2015",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
@ -18,5 +18,9 @@
"es2018", "es2018",
"dom" "dom"
] ]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
} }
} }

View File

@ -0,0 +1,18 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}

View File

@ -1,32 +1,32 @@
{ {
"rulesDirectory": [ "extends": "tslint:recommended",
"codelyzer"
],
"rules": { "rules": {
"arrow-return-shorthand": true, "array-type": false,
"callable-types": true, "arrow-parens": false,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": { "deprecation": {
"severity": "warn" "severity": "warning"
}, },
"eofline": true, "component-class-suffix": true,
"forin": true, "contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"import-blacklist": [ "import-blacklist": [
true, true,
"rxjs/Rx" "rxjs/Rx"
], ],
"import-spacing": true, "interface-name": false,
"indent": [ "max-classes-per-file": false,
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [ "max-line-length": [
true, true,
140 140
@ -43,8 +43,7 @@
] ]
} }
], ],
"no-arg": true, "no-consecutive-blank-lines": false,
"no-bitwise": true,
"no-console": [ "no-console": [
true, true,
"debug", "debug",
@ -53,78 +52,40 @@
"timeEnd", "timeEnd",
"trace" "trace"
], ],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false, "no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [ "no-inferrable-types": [
true, true,
"ignore-params" "ignore-params"
], ],
"no-misused-new": true,
"no-non-null-assertion": true, "no-non-null-assertion": true,
"no-redundant-jsdoc": true, "no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true, "no-switch-case-fall-through": true,
"no-trailing-whitespace": true, "no-var-requires": false,
"no-unnecessary-initializer": true, "object-literal-key-quotes": [
"no-unused-expression": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true, true,
"check-open-brace", "as-needed"
"check-catch",
"check-else",
"check-whitespace"
], ],
"prefer-const": true, "object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [ "quotemark": [
true, true,
"single" "single"
], ],
"radix": true, "trailing-comma": false,
"semicolon": [ "no-conflicting-lifecycle": true,
true, "no-host-metadata-property": true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true, "no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true, "no-output-rename": true,
"use-life-cycle-interface": true, "no-outputs-metadata-property": true,
"use-pipe-transform-interface": true, "template-banana-in-box": true,
"component-class-suffix": true, "template-no-negated-async": true,
"directive-class-suffix": true "use-lifecycle-interface": true,
} "use-pipe-transform-interface": true
},
"rulesDirectory": [
"codelyzer"
]
} }