Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 7b527d4

Browse files
ghillertoodamien
authored andcommitted
gh-795 Migrate to Angular 6
* Convert configuration files from `.angular-cli.json` to `angular.json` * Move E2E tests to `e2e/src` * Move Protractor configuration files to `e2e` folder * Refactor error handling classes due to stricter type-checking of generics * Add `rxjs-compat` to avoid having to refactor RxJs to use pipeable operators * Fix deprecated RxJS usages * Update Readme * Update Flo to `0.8.0`
1 parent e338366 commit 7b527d4

File tree

77 files changed

+529
-458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+529
-458
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ You can view the results via your browser at: http://127.0.0.1:8888/
168168
## Code Coverage Report
169169
Produces code coverage report.
170170

171-
$ ng test --browsers PhantomJS --single-run --code-coverage --reporters=coverage-istanbul
171+
$ ng test --browsers PhantomJS --watch --code-coverage --reporters=coverage-istanbul
172172

173173
[Angular]: http://angular.io/
174174
[Angular CLI]: https://cli.angular.io/

run-npm-e2e-local.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
set -ev
33
cd ui
44
npm install
5+
pwd
6+
ls -al
7+
ls -al e2e
58
npm run e2e
69
cd ..

ui/.angular-cli.json

Lines changed: 0 additions & 61 deletions
This file was deleted.

ui/.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ npm-debug.log
3333
testem.log
3434
/typings
3535

36-
# e2e
37-
/e2e/*.js
38-
/e2e/*.map
39-
4036
# System Files
4137
.DS_Store
4238
Thumbs.db

ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The following instructions can be used to do this:
6464

6565
## Unit Tests
6666

67-
$ ng test --browsers ChromeHeadless --single-run
67+
$ ng test --browsers ChromeHeadless --watch
6868

6969
## E2E Tests
7070

ui/angular.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"dataflow": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"styleext": "scss"
14+
}
15+
},
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": "src/polyfills.ts",
24+
"tsConfig": "src/tsconfig.app.json",
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets",
28+
"src/logout-success-oauth.html"
29+
],
30+
"styles": [
31+
"src/styles.scss"
32+
],
33+
"scripts": []
34+
},
35+
"configurations": {
36+
"production": {
37+
"fileReplacements": [
38+
{
39+
"replace": "src/environments/environment.ts",
40+
"with": "src/environments/environment.prod.ts"
41+
}
42+
],
43+
"optimization": true,
44+
"outputHashing": "all",
45+
"sourceMap": false,
46+
"extractCss": true,
47+
"namedChunks": false,
48+
"aot": true,
49+
"extractLicenses": true,
50+
"vendorChunk": false,
51+
"buildOptimizer": true
52+
}
53+
}
54+
},
55+
"serve": {
56+
"builder": "@angular-devkit/build-angular:dev-server",
57+
"options": {
58+
"browserTarget": "dataflow:build",
59+
"proxyConfig": "proxy.conf.json"
60+
},
61+
"configurations": {
62+
"production": {
63+
"browserTarget": "dataflow:build:production"
64+
}
65+
}
66+
},
67+
"extract-i18n": {
68+
"builder": "@angular-devkit/build-angular:extract-i18n",
69+
"options": {
70+
"browserTarget": "dataflow:build"
71+
}
72+
},
73+
"test": {
74+
"builder": "@angular-devkit/build-angular:karma",
75+
"options": {
76+
"main": "src/test.ts",
77+
"polyfills": "src/polyfills.ts",
78+
"tsConfig": "src/tsconfig.spec.json",
79+
"karmaConfig": "src/karma.conf.js",
80+
"styles": [
81+
"src/styles.scss"
82+
],
83+
"scripts": [],
84+
"assets": [
85+
"src/favicon.ico",
86+
"src/assets",
87+
"src/logout-success-oauth.html"
88+
]
89+
}
90+
},
91+
"lint": {
92+
"builder": "@angular-devkit/build-angular:tslint",
93+
"options": {
94+
"tsConfig": [
95+
"src/tsconfig.app.json",
96+
"src/tsconfig.spec.json"
97+
],
98+
"exclude": [
99+
"**/node_modules/**"
100+
]
101+
}
102+
}
103+
}
104+
},
105+
"dataflow-e2e": {
106+
"root": "e2e/",
107+
"projectType": "application",
108+
"architect": {
109+
"e2e": {
110+
"builder": "@angular-devkit/build-angular:protractor",
111+
"options": {
112+
"protractorConfig": "e2e/protractor.conf.js",
113+
"devServerTarget": "dataflow:serve:production"
114+
},
115+
"configurations": {
116+
"production": {
117+
"devServerTarget": "dataflow:serve:production"
118+
}
119+
}
120+
},
121+
"lint": {
122+
"builder": "@angular-devkit/build-angular:tslint",
123+
"options": {
124+
"tsConfig": "e2e/tsconfig.e2e.json",
125+
"exclude": [
126+
"**/node_modules/**"
127+
]
128+
}
129+
}
130+
}
131+
}
132+
},
133+
"defaultProject": "dataflow"
134+
}

ui/protractor-browserstack.conf.js renamed to ui/e2e/protractor-browserstack.conf.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.config = {
1818
},
1919
plugins: [
2020
{
21-
path: 'protractor-docker-plugin/index.js',
21+
path: '../protractor-docker-plugin/index.js',
2222
dockerComposeUri: 'https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/spring-cloud-dataflow-server-local/docker-compose.yml',
2323
useCachedoDockerComposeFile: true
2424
}
@@ -41,7 +41,7 @@ exports.config = {
4141
maxSessions: 1,
4242
allScriptsTimeout: 160000,
4343
specs: [
44-
'./e2e/**/*.e2e-spec.ts'
44+
'./src/**/*.e2e-spec.ts'
4545
],
4646
directConnect: false,
4747
baseUrl: 'http://localhost:4200/',
@@ -52,7 +52,10 @@ exports.config = {
5252
return new Promise(function(resolve, reject){
5353
exports.bs_local = new browserstack.Local();
5454
exports.bs_local.start({'key': exports.config.commonCapabilities['browserstack.key'] }, function(error) {
55-
if (error) return reject(error);
55+
if (error) {
56+
console.log('Error:', error);
57+
return reject(error);
58+
}
5659
console.log('Connected. Now testing...');
5760

5861
resolve();
@@ -73,7 +76,7 @@ exports.config = {
7376
},
7477
onPrepare() {
7578
require('ts-node').register({
76-
project: 'e2e/tsconfig.e2e.json'
79+
project: require('path').join(__dirname, './tsconfig.e2e.json')
7780
});
7881
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
7982
}

ui/protractor-saucelabs.conf.js renamed to ui/e2e/protractor-saucelabs.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports.config = {
1111
sauceKey: process.env.SAUCE_ACCESS_KEY,
1212
plugins: [
1313
{
14-
path: 'protractor-docker-plugin/index.js',
14+
path: '../protractor-docker-plugin/index.js',
1515
dockerComposeUri: 'https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/spring-cloud-dataflow-server-local/docker-compose.yml',
1616
useCachedoDockerComposeFile: true
1717
}
@@ -31,7 +31,7 @@ exports.config = {
3131
maxSessions: 1,
3232
allScriptsTimeout: 160000,
3333
specs: [
34-
'./e2e/**/*.e2e-spec.ts'
34+
'./src/**/*.e2e-spec.ts'
3535
],
3636
directConnect: false,
3737
baseUrl: 'http://localhost:4200/',
@@ -49,7 +49,7 @@ exports.config = {
4949
},
5050
onPrepare() {
5151
require('ts-node').register({
52-
project: 'e2e/tsconfig.e2e.json'
52+
project: require('path').join(__dirname, './tsconfig.e2e.json')
5353
});
5454
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
5555
}

ui/protractor.conf.js renamed to ui/e2e/protractor.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ const { SpecReporter } = require('jasmine-spec-reporter');
66
exports.config = {
77
plugins: [
88
{
9-
path: 'protractor-docker-plugin/index.js',
9+
path: '../protractor-docker-plugin/index.js',
1010
dockerComposeUri: 'https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/master/spring-cloud-dataflow-server-local/docker-compose.yml',
1111
useCachedoDockerComposeFile: true
1212
}
1313
],
1414
allScriptsTimeout: 110000,
1515
specs: [
16-
'./e2e/**/*.e2e-spec.ts'
16+
'./src/**/*.e2e-spec.ts'
1717
],
1818
capabilities: {
1919
'browserName': 'chrome',
@@ -31,7 +31,7 @@ exports.config = {
3131
},
3232
onPrepare() {
3333
require('ts-node').register({
34-
project: 'e2e/tsconfig.e2e.json'
34+
project: require('path').join(__dirname, './tsconfig.e2e.json')
3535
});
3636
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
3737
}
File renamed without changes.

0 commit comments

Comments
 (0)