Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ $ yarn ng update @angular/cli @angular-devkit/build-angular

## Render3 tests

The directory `hello_world_cli` contains a test for render3 used with the angular cli.
The directory `cli-hello-world-ivy-compat` contains a test for render3 used with the angular cli.

If the Angular CLI is modified to generate a render3 application this should be replaced with that project.

If the render3 is updated to support the Angular 5 bootstrap a version of this project should be created that
uses the Angular 5 bootstrap.
The `cli-hello-world-ivy-minimal` contains a minimal ivy app that is meant to mimic the bazel
equivalent in `packages/core/test/bundling/hello_world`, and should be kept similar.

## Writing an integration test

Expand Down
15 changes: 12 additions & 3 deletions integration/_payload-limits.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@
"master": {
"uncompressed": {
"runtime": 1497,
"main": 189865,
"main": 164671,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work! 🎉

"polyfills": 38449
}
}
},
"cli-hello-world-ivy": {
"cli-hello-world-ivy-minimal": {
"master": {
"uncompressed": {
"runtime": 1440,
"main": 584188,
"main": 12708,
"polyfills": 38390
}
}
},
"cli-hello-world-ivy-compat": {
"master": {
"uncompressed": {
"runtime": 1440,
"main": 194626,
Comment thread
gkalpak marked this conversation as resolved.
Resolved
"polyfills": 38390
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"newProjectRoot": "projects",
"projects": {
"cli-hello-world-ivy": {
"cli-hello-world-ivy-compat": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
Expand Down Expand Up @@ -60,25 +60,25 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "cli-hello-world-ivy:build"
"browserTarget": "cli-hello-world-ivy-compat:build"
},
"configurations": {
"production": {
"browserTarget": "cli-hello-world-ivy:build:production"
"browserTarget": "cli-hello-world-ivy-compat:build:production"
},
"ci": {
"progress": false
},
"ci-production": {
"browserTarget": "cli-hello-world-ivy:build:production",
"browserTarget": "cli-hello-world-ivy-compat:build:production",
"progress": false
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "cli-hello-world-ivy:build"
"browserTarget": "cli-hello-world-ivy-compat:build"
}
},
"test": {
Expand Down Expand Up @@ -112,7 +112,7 @@
}
}
},
"cli-hello-world-ivy-e2e": {
"cli-hello-world-ivy-compat-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
Expand All @@ -121,17 +121,17 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "cli-hello-world-ivy:serve"
"devServerTarget": "cli-hello-world-ivy-compat:serve"
},
"configurations": {
"production": {
"devServerTarget": "cli-hello-world-ivy:serve:production"
"devServerTarget": "cli-hello-world-ivy-compat:serve:production"
},
"ci": {
"devServerTarget": "cli-hello-world-ivy:serve:ci"
"devServerTarget": "cli-hello-world-ivy-compat:serve:ci"
},
"ci-production": {
"devServerTarget": "cli-hello-world-ivy:serve:ci-production"
"devServerTarget": "cli-hello-world-ivy-compat:serve:ci-production"
}
}
},
Expand All @@ -147,5 +147,5 @@
}
}
},
"defaultProject": "cli-hello-world-ivy"
"defaultProject": "cli-hello-world-ivy-compat"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('cli-hello-world-ivy App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy!');
expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy-compat!');
});

it('the percent pipe should work', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cli-hello-world-ivy",
"name": "cli-hello-world-ivy-compat",
"version": "0.0.0",
"license": "MIT",
"scripts": {
Expand All @@ -10,9 +10,7 @@
"postinstall": "webdriver-manager update --gecko=false --standalone=false $CI_CHROMEDRIVER_VERSION_ARG && yarn ivy-ngcc",
"start": "ng serve",
"pretest": "ng version",
"//test1": "TODO FW-813: Re-enable `ci-production`. Currently, it fails after a timeout as Protractor reports Angular cannot be found on the page",
"//test2": "ng test --progress=false --watch=false && yarn e2e --configuration=ci && yarn e2e --configuration=ci-production",
"test": "ng test --progress=false --watch=false && yarn e2e --configuration=ci"
"test": "ng test --progress=false --watch=false && yarn e2e --configuration=ci && yarn e2e --configuration=ci-production"
Comment thread
gkalpak marked this conversation as resolved.
Resolved
},
"private": true,
"dependencies": {
Expand All @@ -31,7 +29,7 @@
"zone.js": "file:../../node_modules/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.1",
"@angular-devkit/build-angular": "0.13.0-rc.0",
"@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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have as title 'cli-hello-world-ivy'`, () => {
it(`should have as title 'cli-hello-world-ivy-compat'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('cli-hello-world-ivy');
expect(app.title).toEqual('cli-hello-world-ivy-compat');
});

it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to cli-hello-world-ivy!');
expect(compiled.querySelector('h1').textContent).toContain('Welcome to cli-hello-world-ivy-compat!');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'cli-hello-world-ivy';
title = 'cli-hello-world-ivy-compat';
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>CliHelloWorldIvy</title>
<title>CliHelloWorldIvyCompat</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
13 changes: 13 additions & 0 deletions integration/cli-hello-world-ivy-minimal/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
27 changes: 27 additions & 0 deletions integration/cli-hello-world-ivy-minimal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# CliHelloWorldIvyMinimal

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0-rc.0.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
151 changes: 151 additions & 0 deletions integration/cli-hello-world-ivy-minimal/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "yarn"
},
"newProjectRoot": "projects",
"projects": {
"cli-hello-world-ivy-minimal": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "cli-hello-world-ivy-minimal:build"
},
"configurations": {
"production": {
"browserTarget": "cli-hello-world-ivy-minimal:build:production"
},
"ci": {
"progress": false
},
"ci-production": {
"browserTarget": "cli-hello-world-ivy-minimal:build:production",
"progress": false
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "cli-hello-world-ivy-minimal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"cli-hello-world-ivy-minimal-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "cli-hello-world-ivy-minimal:serve"
},
"configurations": {
"production": {
"devServerTarget": "cli-hello-world-ivy-minimal:serve:production"
},
"ci": {
"devServerTarget": "cli-hello-world-ivy-minimal:serve:ci"
},
"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"
}
Loading