From 8e2e1f8340299e157782fd49b17eb65d7e34a9ec Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 Oct 2019 13:37:18 +0100 Subject: [PATCH] test: update integration/cli-hello-world-ivy-minimal project structure (#33175) PR Close #33175 --- integration/_payload-limits.json | 9 +- .../cli-hello-world-ivy-minimal/.gitignore | 46 +++++++ .../cli-hello-world-ivy-minimal/README.md | 2 +- .../cli-hello-world-ivy-minimal/angular.json | 54 +++----- .../cli-hello-world-ivy-minimal/browserslist | 12 ++ .../e2e/protractor.conf.js | 6 +- .../e2e/src/app.e2e-spec.ts | 11 +- .../e2e/{tsconfig.e2e.json => tsconfig.json} | 4 +- .../{src => }/karma.conf.js | 11 +- .../cli-hello-world-ivy-minimal/package.json | 19 ++- .../src/browserslist | 11 -- .../src/favicon.ico | Bin 5430 -> 948 bytes .../src/polyfills.ts | 22 --- .../src/tsconfig.app.json | 14 -- .../src/tsconfig.spec.json | 18 --- .../src/tslint.json | 17 --- .../tsconfig.app.json | 14 ++ .../cli-hello-world-ivy-minimal/tsconfig.json | 12 +- .../tsconfig.spec.json | 18 +++ .../cli-hello-world-ivy-minimal/tslint.json | 125 ++++++------------ 20 files changed, 196 insertions(+), 229 deletions(-) create mode 100644 integration/cli-hello-world-ivy-minimal/.gitignore create mode 100644 integration/cli-hello-world-ivy-minimal/browserslist rename integration/cli-hello-world-ivy-minimal/e2e/{tsconfig.e2e.json => tsconfig.json} (84%) rename integration/cli-hello-world-ivy-minimal/{src => }/karma.conf.js (81%) delete mode 100644 integration/cli-hello-world-ivy-minimal/src/browserslist delete mode 100644 integration/cli-hello-world-ivy-minimal/src/tsconfig.app.json delete mode 100644 integration/cli-hello-world-ivy-minimal/src/tsconfig.spec.json delete mode 100644 integration/cli-hello-world-ivy-minimal/src/tslint.json create mode 100644 integration/cli-hello-world-ivy-minimal/tsconfig.app.json create mode 100644 integration/cli-hello-world-ivy-minimal/tsconfig.spec.json diff --git a/integration/_payload-limits.json b/integration/_payload-limits.json index a0e1ab4d79..6c1ecb0d8e 100644 --- a/integration/_payload-limits.json +++ b/integration/_payload-limits.json @@ -14,9 +14,12 @@ "cli-hello-world-ivy-minimal": { "master": { "uncompressed": { - "runtime": 1485, - "main": 14213, - "polyfills": 45482 + "runtime-es2015": 1485, + "runtime-es5": 1485, + "main-es2015": 14440, + "main-es5": 14582, + "polyfills-es2015": 36808, + "polyfills-es5": 127675 } } }, diff --git a/integration/cli-hello-world-ivy-minimal/.gitignore b/integration/cli-hello-world-ivy-minimal/.gitignore new file mode 100644 index 0000000000..86d943a9b2 --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/.gitignore @@ -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 diff --git a/integration/cli-hello-world-ivy-minimal/README.md b/integration/cli-hello-world-ivy-minimal/README.md index b89f9e7dae..c3c6b2eb8c 100644 --- a/integration/cli-hello-world-ivy-minimal/README.md +++ b/integration/cli-hello-world-ivy-minimal/README.md @@ -1,6 +1,6 @@ # 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 diff --git a/integration/cli-hello-world-ivy-minimal/angular.json b/integration/cli-hello-world-ivy-minimal/angular.json index a79920daea..48c66509d0 100644 --- a/integration/cli-hello-world-ivy-minimal/angular.json +++ b/integration/cli-hello-world-ivy-minimal/angular.json @@ -1,17 +1,14 @@ { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, - "cli": { - "packageManager": "yarn" - }, "newProjectRoot": "projects", "projects": { "cli-hello-world-ivy-minimal": { + "projectType": "application", + "schematics": {}, "root": "", "sourceRoot": "src", - "projectType": "application", "prefix": "app", - "schematics": {}, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", @@ -20,7 +17,8 @@ "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.app.json", + "tsConfig": "tsconfig.app.json", + "aot": true, "assets": [ "src/favicon.ico", "src/assets" @@ -44,7 +42,6 @@ "sourceMap": false, "extractCss": true, "namedChunks": false, - "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, @@ -53,6 +50,11 @@ "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" } ] } @@ -87,16 +89,16 @@ "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", - "styles": [ - "src/styles.css" - ], - "scripts": [], + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", "src/assets" ], + "styles": [ + "src/styles.css" + ], + "scripts": [], "progress": false, "watch": false } @@ -105,21 +107,15 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" ], "exclude": [ "**/node_modules/**" ] } - } - } - }, - "cli-hello-world-ivy-minimal-e2e": { - "root": "e2e/", - "projectType": "application", - "prefix": "", - "architect": { + }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { @@ -138,18 +134,8 @@ "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" } diff --git a/integration/cli-hello-world-ivy-minimal/browserslist b/integration/cli-hello-world-ivy-minimal/browserslist new file mode 100644 index 0000000000..80848532e4 --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/browserslist @@ -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'. \ No newline at end of file diff --git a/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js b/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js index 71baa5048b..b5fe2936d2 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js +++ b/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js @@ -1,8 +1,12 @@ +// @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: [ @@ -25,7 +29,7 @@ exports.config = { }, onPrepare() { 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 } })); } diff --git a/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts b/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts index 933df0f309..49440ef055 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts +++ b/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts @@ -1,10 +1,9 @@ -import { browser } from 'protractor'; import { AppPage } from './app.po'; +import { browser, logging } from 'protractor'; describe('cli-hello-world-ivy-minimal App', () => { // Ivy renderComponent apps fail on protractor when waiting for Angular. browser.waitForAngularEnabled(false); - let page: AppPage; beforeEach(() => { @@ -15,4 +14,12 @@ describe('cli-hello-world-ivy-minimal App', () => { page.navigateTo(); 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)); + }); }); diff --git a/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json b/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json similarity index 84% rename from integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json rename to integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json index a6dd622028..39b800f789 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json +++ b/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "../out-tsc/app", + "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", "types": [ @@ -10,4 +10,4 @@ "node" ] } -} \ No newline at end of file +} diff --git a/integration/cli-hello-world-ivy-minimal/src/karma.conf.js b/integration/cli-hello-world-ivy-minimal/karma.conf.js similarity index 81% rename from integration/cli-hello-world-ivy-minimal/src/karma.conf.js rename to integration/cli-hello-world-ivy-minimal/karma.conf.js index 375eb671d0..d8d068fb67 100644 --- a/integration/cli-hello-world-ivy-minimal/src/karma.conf.js +++ b/integration/cli-hello-world-ivy-minimal/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, 'coverage'), + dir: require('path').join(__dirname, './coverage/latest-app'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, @@ -25,13 +25,8 @@ module.exports = function (config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['CustomChrome'], + browsers: ['Chrome'], singleRun: false, - customLaunchers: { - CustomChrome: { - base: 'Chrome', - flags: ['--no-sandbox'] - } - } + restartOnFileChange: true }); }; diff --git a/integration/cli-hello-world-ivy-minimal/package.json b/integration/cli-hello-world-ivy-minimal/package.json index 7f8eb6cbb6..46eb82487c 100644 --- a/integration/cli-hello-world-ivy-minimal/package.json +++ b/integration/cli-hello-world-ivy-minimal/package.json @@ -23,7 +23,6 @@ "@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", - "core-js": "file:../../node_modules/core-js", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", "zone.js": "file:../../node_modules/zone.js" @@ -33,19 +32,19 @@ "@angular/cli": "file:../../node_modules/@angular/cli", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@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/node": "file:../../node_modules/@types/node", - "codelyzer": "~4.5.0", - "jasmine-core": "~2.99.1", + "codelyzer": "^5.1.2", + "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~3.1.1", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", + "karma": "~4.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~2.1.0", + "karma-jasmine": "~2.0.1", + "karma-jasmine-html-reporter": "^1.4.2", "protractor": "file:../../node_modules/protractor", - "ts-node": "~7.0.0", + "ts-node": "~8.3.0", "tslint": "~5.18.0", "typescript": "file:../../node_modules/typescript" } diff --git a/integration/cli-hello-world-ivy-minimal/src/browserslist b/integration/cli-hello-world-ivy-minimal/src/browserslist deleted file mode 100644 index 37371cb04b..0000000000 --- a/integration/cli-hello-world-ivy-minimal/src/browserslist +++ /dev/null @@ -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 \ No newline at end of file diff --git a/integration/cli-hello-world-ivy-minimal/src/favicon.ico b/integration/cli-hello-world-ivy-minimal/src/favicon.ico index 8081c7ceaf2be08bf59010158c586170d9d2d517..997406ad22c29aae95893fb3d666c30258a09537 100644 GIT binary patch literal 948 zcmV;l155mgP)CBYU7IjCFmI-B}4sMJt3^s9NVg!P0 z6hDQy(L`XWMkB@zOLgN$4KYz;j0zZxq9KKdpZE#5@k0crP^5f9KO};h)ZDQ%ybhht z%t9#h|nu0K(bJ ztIkhEr!*UyrZWQ1k2+YkGqDi8Z<|mIN&$kzpKl{cNP=OQzXHz>vn+c)F)zO|Bou>E z2|-d_=qY#Y+yOu1a}XI?cU}%04)zz%anD(XZC{#~WreV!a$7k2Ug`?&CUEc0EtrkZ zL49MB)h!_K{H(*l_93D5tO0;BUnvYlo+;yss%n^&qjt6fZOa+}+FDO(~2>G z2dx@=JZ?DHP^;b7*Y1as5^uphBsh*s*z&MBd?e@I>-9kU>63PjP&^#5YTOb&x^6Cf z?674rmSHB5Fk!{Gv7rv!?qX#ei_L(XtwVqLX3L}$MI|kJ*w(rhx~tc&L&xP#?cQow zX_|gx$wMr3pRZIIr_;;O|8fAjd;1`nOeu5K(pCu7>^3E&D2OBBq?sYa(%S?GwG&_0-s%_v$L@R!5H_fc)lOb9ZoOO#p`Nn`KU z3LTTBtjwo`7(HA6 z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