Skip to content

Commit 47ef96e

Browse files
committed
spec: add integration tests + demo
1 parent 146a5c9 commit 47ef96e

23 files changed

+5173
-282
lines changed

integration/.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "geo-test-c92e4"
4+
}
5+
}

integration/angular.json

Lines changed: 121 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,129 @@
11
{
2-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"version": 1,
4-
"newProjectRoot": "projects",
5-
"projects": {
6-
"integration": {
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/integration",
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-
],
29-
"styles": [
30-
"src/styles.scss"
31-
],
32-
"scripts": []
33-
},
34-
"configurations": {
35-
"production": {
36-
"fileReplacements": [
37-
{
38-
"replace": "src/environments/environment.ts",
39-
"with": "src/environments/environment.prod.ts"
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"integration": {
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/integration",
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+
],
29+
"styles": [
30+
"src/styles.scss"
31+
],
32+
"scripts": []
33+
},
34+
"configurations": {
35+
"production": {
36+
"fileReplacements": [{
37+
"replace": "src/environments/environment.ts",
38+
"with": "src/environments/environment.prod.ts"
39+
}],
40+
"optimization": true,
41+
"outputHashing": "all",
42+
"sourceMap": false,
43+
"extractCss": true,
44+
"namedChunks": false,
45+
"aot": true,
46+
"extractLicenses": true,
47+
"vendorChunk": false,
48+
"buildOptimizer": true
49+
}
50+
}
51+
},
52+
"serve": {
53+
"builder": "@angular-devkit/build-angular:dev-server",
54+
"options": {
55+
"browserTarget": "integration:build"
56+
},
57+
"configurations": {
58+
"production": {
59+
"browserTarget": "integration:build:production"
60+
}
61+
}
62+
},
63+
"extract-i18n": {
64+
"builder": "@angular-devkit/build-angular:extract-i18n",
65+
"options": {
66+
"browserTarget": "integration:build"
67+
}
68+
},
69+
"test": {
70+
"builder": "@angular-devkit/build-angular:karma",
71+
"options": {
72+
"main": "src/test.ts",
73+
"polyfills": "src/polyfills.ts",
74+
"tsConfig": "src/tsconfig.spec.json",
75+
"karmaConfig": "src/karma.conf.js",
76+
"styles": [
77+
"src/styles.scss"
78+
],
79+
"scripts": [],
80+
"assets": [
81+
"src/favicon.ico",
82+
"src/assets"
83+
]
84+
}
85+
},
86+
"lint": {
87+
"builder": "@angular-devkit/build-angular:tslint",
88+
"options": {
89+
"tsConfig": [
90+
"src/tsconfig.app.json",
91+
"src/tsconfig.spec.json"
92+
],
93+
"exclude": [
94+
"**/node_modules/**"
95+
]
96+
}
4097
}
41-
],
42-
"optimization": true,
43-
"outputHashing": "all",
44-
"sourceMap": false,
45-
"extractCss": true,
46-
"namedChunks": false,
47-
"aot": true,
48-
"extractLicenses": true,
49-
"vendorChunk": false,
50-
"buildOptimizer": true
5198
}
52-
}
5399
},
54-
"serve": {
55-
"builder": "@angular-devkit/build-angular:dev-server",
56-
"options": {
57-
"browserTarget": "integration:build"
58-
},
59-
"configurations": {
60-
"production": {
61-
"browserTarget": "integration:build:production"
100+
"integration-e2e": {
101+
"root": "e2e/",
102+
"projectType": "application",
103+
"architect": {
104+
"e2e": {
105+
"builder": "@angular-devkit/build-angular:protractor",
106+
"options": {
107+
"protractorConfig": "e2e/protractor.conf.js",
108+
"devServerTarget": "integration:serve"
109+
},
110+
"configurations": {
111+
"production": {
112+
"devServerTarget": "integration:serve:production"
113+
}
114+
}
115+
},
116+
"lint": {
117+
"builder": "@angular-devkit/build-angular:tslint",
118+
"options": {
119+
"tsConfig": "e2e/tsconfig.e2e.json",
120+
"exclude": [
121+
"**/node_modules/**"
122+
]
123+
}
124+
}
62125
}
63-
}
64-
},
65-
"extract-i18n": {
66-
"builder": "@angular-devkit/build-angular:extract-i18n",
67-
"options": {
68-
"browserTarget": "integration:build"
69-
}
70-
},
71-
"test": {
72-
"builder": "@angular-devkit/build-angular:karma",
73-
"options": {
74-
"main": "src/test.ts",
75-
"polyfills": "src/polyfills.ts",
76-
"tsConfig": "src/tsconfig.spec.json",
77-
"karmaConfig": "src/karma.conf.js",
78-
"styles": [
79-
"src/styles.scss"
80-
],
81-
"scripts": [],
82-
"assets": [
83-
"src/favicon.ico",
84-
"src/assets"
85-
]
86-
}
87-
},
88-
"lint": {
89-
"builder": "@angular-devkit/build-angular:tslint",
90-
"options": {
91-
"tsConfig": [
92-
"src/tsconfig.app.json",
93-
"src/tsconfig.spec.json"
94-
],
95-
"exclude": [
96-
"**/node_modules/**"
97-
]
98-
}
99126
}
100-
}
101127
},
102-
"integration-e2e": {
103-
"root": "e2e/",
104-
"projectType": "application",
105-
"architect": {
106-
"e2e": {
107-
"builder": "@angular-devkit/build-angular:protractor",
108-
"options": {
109-
"protractorConfig": "e2e/protractor.conf.js",
110-
"devServerTarget": "integration:serve"
111-
},
112-
"configurations": {
113-
"production": {
114-
"devServerTarget": "integration:serve:production"
115-
}
116-
}
117-
},
118-
"lint": {
119-
"builder": "@angular-devkit/build-angular:tslint",
120-
"options": {
121-
"tsConfig": "e2e/tsconfig.e2e.json",
122-
"exclude": [
123-
"**/node_modules/**"
124-
]
125-
}
126-
}
127-
}
128-
}
129-
},
130-
"defaultProject": "integration"
128+
"defaultProject": "integration"
131129
}

integration/e2e/protractor.conf.js

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

integration/e2e/src/app.e2e-spec.ts

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

integration/e2e/src/app.po.ts

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

integration/e2e/tsconfig.e2e.json

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

integration/firebase.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"hosting": {
3+
"public": "dist/integration",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"rewrites": [
10+
{
11+
"source": "**",
12+
"destination": "/index.html"
13+
}
14+
]
15+
},
16+
"functions": {
17+
"predeploy": [
18+
"npm --prefix \"$RESOURCE_DIR\" run lint"
19+
],
20+
"source": "functions"
21+
}
22+
}

0 commit comments

Comments
 (0)