test(aio): fix upgrade-phonecat examples e2e tests (#24583)

Closes #19625

PR Close #24583
This commit is contained in:
George Kalpakas 2018-06-20 14:01:23 +03:00 committed by Jason Aden
parent 7d1f9c8a7c
commit 941d2cdaaf
16 changed files with 47 additions and 65 deletions

View File

@ -60,6 +60,8 @@ dist/
!rollup-config.js
aot-compiler/**/*.d.ts
aot-compiler/**/*.factory.d.ts
upgrade-phonecat-2-hybrid/aot/**/*
!upgrade-phonecat-2-hybrid/aot/index.html
# i18n
!i18n/src/systemjs-text-plugin.js

View File

@ -8,6 +8,7 @@
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
}
}

View File

@ -8,10 +8,8 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
]
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
},
"compileOnSave": true,
"exclude": [

View File

@ -1,6 +1,6 @@
// #docregion
import { platformBrowser } from '@angular/platform-browser';
import { AppModuleNgFactory } from '../aot/app/app.module.ngfactory';
import { AppModuleNgFactory } from './app.module.ngfactory';
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@ -3,7 +3,7 @@
import { ActivatedRoute } from '@angular/router';
// #enddocregion activatedroute
import { Observable } from 'rxjs';
import { Observable, of } from 'rxjs';
import { async, TestBed } from '@angular/core/testing';
@ -21,7 +21,7 @@ function xyzPhoneData(): PhoneData {
class MockPhone {
get(id: string): Observable<PhoneData> {
return Observable.of(xyzPhoneData());
return of(xyzPhoneData());
}
}

View File

@ -2,7 +2,7 @@
// #docregion
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { Observable, of } from 'rxjs';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SpyLocation } from '@angular/common/testing';
@ -15,7 +15,7 @@ class ActivatedRouteMock {
class MockPhone {
query(): Observable<PhoneData[]> {
return Observable.of([
return of([
{name: 'Nexus S', snippet: '', images: []},
{name: 'Motorola DROID', snippet: '', images: []}
]);

View File

@ -9,10 +9,8 @@
"lib": ["es2015", "dom"],
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
]
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
},
"files": [
@ -21,7 +19,6 @@
],
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit" : true
"skipMetadataEmit" : true
}
}

View File

@ -8,10 +8,8 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
]
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
},
"compileOnSave": true,
"exclude": [

View File

@ -3,7 +3,7 @@
import { ActivatedRoute } from '@angular/router';
// #enddocregion activatedroute
import { Observable } from 'rxjs';
import { Observable, of } from 'rxjs';
import { async, TestBed } from '@angular/core/testing';
@ -21,7 +21,7 @@ function xyzPhoneData(): PhoneData {
class MockPhone {
get(id: string): Observable<PhoneData> {
return Observable.of(xyzPhoneData());
return of(xyzPhoneData());
}
}

View File

@ -2,7 +2,7 @@
// #docregion routestuff
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { Observable, of } from 'rxjs';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SpyLocation } from '@angular/common/testing';
@ -17,7 +17,7 @@ class ActivatedRouteMock {
class MockPhone {
query(): Observable<PhoneData[]> {
return Observable.of([
return of([
{name: 'Nexus S', snippet: '', images: []},
{name: 'Motorola DROID', snippet: '', images: []}
]);

View File

@ -8,10 +8,8 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
]
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
},
"compileOnSave": true,
"exclude": [

View File

@ -32,7 +32,7 @@
"test-pwa-score": "node scripts/test-pwa-score",
"example-e2e": "yarn example-check-local && node ./tools/examples/run-example-e2e",
"example-lint": "tslint -c \"content/examples/tslint.json\" \"content/examples/**/*.ts\" -e \"content/examples/styleguide/**/*.avoid.ts\"",
"example-use-local": "node tools/ng-packages-installer overwrite ./tools/examples/shared",
"example-use-local": "node tools/ng-packages-installer overwrite ./tools/examples/shared --debug",
"example-use-npm": "node tools/ng-packages-installer restore ./tools/examples/shared",
"example-check-local": "node tools/ng-packages-installer check ./tools/examples/shared",
"deploy-preview": "scripts/deploy-preview.sh",

View File

@ -18,7 +18,6 @@ const EXAMPLE_CONFIG_FILENAME = 'example-config.json';
const IGNORED_EXAMPLES = [ // temporary ignores
'quickstart',
'setup',
'upgrade-p'
];
/**

View File

@ -8,10 +8,8 @@
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"../node_modules/@types/"
]
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
},
"compileOnSave": true,
"exclude": [

View File

@ -45,16 +45,15 @@
"@angular/compiler-cli": "^6.0.0",
"@angular/language-service": "^6.0.0",
"@angular/platform-server": "^6.0.0",
"@types/angular": "^1.5.16",
"@types/angular-animate": "^1.5.5",
"@types/angular-cookies": "^1.4.2",
"@types/angular-mocks": "^1.5.5",
"@types/angular-resource": "^1.5.6",
"@types/angular-route": "^1.3.2",
"@types/angular-sanitize": "^1.3.3",
"@types/angular": "^1.6.47",
"@types/angular-animate": "^1.5.10",
"@types/angular-mocks": "^1.6.0",
"@types/angular-resource": "^1.5.14",
"@types/angular-route": "^1.3.5",
"@types/express": "^4.0.35",
"@types/jasmine": "~2.8.0",
"@types/jasminewd2": "^2.0.3",
"@types/jquery": "^3.3.4",
"@types/node": "^6.0.45",
"canonical-path": "0.0.2",
"concurrently": "^3.0.0",

View File

@ -240,45 +240,33 @@
version "0.7.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
"@types/angular-animate@^1.5.5":
version "1.5.8"
resolved "https://registry.yarnpkg.com/@types/angular-animate/-/angular-animate-1.5.8.tgz#578e058ee0ca5539e1795421a91ae2f52581dc8f"
"@types/angular-animate@^1.5.10":
version "1.5.10"
resolved "https://registry.yarnpkg.com/@types/angular-animate/-/angular-animate-1.5.10.tgz#b94b45358c61163f1478768e8b081c76439c515f"
dependencies:
"@types/angular" "*"
"@types/angular-cookies@^1.4.2":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@types/angular-cookies/-/angular-cookies-1.4.5.tgz#f5ccf5f42a7b9f4d13e77afb8722034ea9f40bd3"
"@types/angular-mocks@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@types/angular-mocks/-/angular-mocks-1.6.0.tgz#bd32f55b678c239880d2d0d9a3a79b5cad45547e"
dependencies:
"@types/angular" "*"
"@types/angular-mocks@^1.5.5":
version "1.5.11"
resolved "https://registry.yarnpkg.com/@types/angular-mocks/-/angular-mocks-1.5.11.tgz#d5bbefbf742f2196071bda0fe051878b6f4fd72c"
dependencies:
"@types/angular" "*"
"@types/angular-resource@^1.5.6":
"@types/angular-resource@^1.5.14":
version "1.5.14"
resolved "https://registry.yarnpkg.com/@types/angular-resource/-/angular-resource-1.5.14.tgz#902f34e8c98f708ae99493c6d416b39b4a22d9fe"
dependencies:
"@types/angular" "*"
"@types/angular-route@^1.3.2":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@types/angular-route/-/angular-route-1.3.4.tgz#10d3f7eb313fb8a4b832041f9401869803dcd4df"
"@types/angular-route@^1.3.5":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/angular-route/-/angular-route-1.3.5.tgz#78b8e0b069d5efe55ec7072461f4e2f6ae20767b"
dependencies:
"@types/angular" "*"
"@types/angular-sanitize@^1.3.3":
version "1.3.6"
resolved "https://registry.yarnpkg.com/@types/angular-sanitize/-/angular-sanitize-1.3.6.tgz#fec2bd040d38708e46f02e66fba5199e8a64b22e"
dependencies:
"@types/angular" "*"
"@types/angular@*", "@types/angular@^1.5.16":
version "1.6.36"
resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.36.tgz#15e73d632274b5655a391470844863548c7755f4"
"@types/angular@*", "@types/angular@^1.6.47":
version "1.6.47"
resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.47.tgz#f7a31279a02c0892ed9aa76aae2da1b17791bacd"
"@types/body-parser@*":
version "1.16.7"
@ -315,6 +303,10 @@
dependencies:
"@types/jasmine" "*"
"@types/jquery@^3.3.4":
version "3.3.4"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.4.tgz#f1850fb9a70041a14ace4f81a7ed782db8548317"
"@types/mime@*":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b"