Skip to content

Commit a4cac55

Browse files
authored
Merge pull request #27 from 9elements/feature/angular-15
Update to Angular 15
2 parents aa4add6 + cd2a469 commit a4cac55

20 files changed

+8562
-23203
lines changed

.browserslistrc

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

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,12 @@ This repository builds a simple counter with Angular in three ways:
2828

2929
Run `ng test` to execute the unit & integration tests with Karma and Jasmine.
3030

31-
## Running end-to-end tests
32-
33-
### Cypress
31+
## Running end-to-end tests with Cypress
3432

3533
Run `ng run angular-workshop:cypress-run` to execute the Cypress end-to-end tests. (This starts the development server automatically.)
3634

3735
Run `ng run angular-workshop:cypress-open` to start the interactive Cypress test runner.
3836

39-
### Protractor
40-
41-
Run `ng e2e` to execute the Protractor end-to-end tests. (This starts the development server automatically.)
42-
4337
## Deployment
4438

45-
Run `ng deploy --base-href=/angular-workshop/` to the deploy the code to [https://9elements.github.io/angular-workshop/].
39+
Run `npm run deploy` to the deploy the code to [https://9elements.github.io/angular-workshop/].

angular.json

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@
2020
"outputPath": "dist/angular-workshop",
2121
"index": "src/index.html",
2222
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
23+
"polyfills": ["zone.js"],
2424
"tsConfig": "tsconfig.app.json",
25-
"assets": [
26-
"src/favicon.ico",
27-
"src/assets"
28-
],
29-
"styles": [
30-
"src/styles.css"
31-
],
25+
"assets": ["src/favicon.ico", "src/assets"],
26+
"styles": ["src/styles.css"],
3227
"scripts": []
3328
},
3429
"configurations": {
@@ -85,39 +80,18 @@
8580
"test": {
8681
"builder": "@angular-devkit/build-angular:karma",
8782
"options": {
88-
"main": "src/test.ts",
89-
"polyfills": "src/polyfills.ts",
83+
"polyfills": ["zone.js", "zone.js/testing"],
9084
"tsConfig": "tsconfig.spec.json",
9185
"karmaConfig": "karma.conf.js",
92-
"assets": [
93-
"src/favicon.ico",
94-
"src/assets"
95-
],
96-
"styles": [
97-
"src/styles.css"
98-
],
86+
"assets": ["src/favicon.ico", "src/assets"],
87+
"styles": ["src/styles.css"],
9988
"scripts": []
10089
}
10190
},
10291
"lint": {
10392
"builder": "@angular-eslint/builder:lint",
10493
"options": {
105-
"lintFilePatterns": [
106-
"src/**/*.ts",
107-
"src/**/*.html"
108-
]
109-
}
110-
},
111-
"e2e": {
112-
"builder": "@angular-devkit/build-angular:protractor",
113-
"options": {
114-
"protractorConfig": "e2e/protractor.conf.js",
115-
"devServerTarget": "angular-workshop:serve"
116-
},
117-
"configurations": {
118-
"production": {
119-
"devServerTarget": "angular-workshop:serve:production"
120-
}
94+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
12195
}
12296
},
12397
"deploy": {
@@ -141,14 +115,33 @@
141115
"watch": true,
142116
"headless": false
143117
}
118+
},
119+
"e2e": {
120+
"builder": "@cypress/schematic:cypress",
121+
"options": {
122+
"devServerTarget": "angular-workshop:serve",
123+
"watch": true,
124+
"headless": false
125+
},
126+
"configurations": {
127+
"production": {
128+
"devServerTarget": "angular-workshop:serve:production"
129+
}
130+
}
144131
}
145132
}
146133
}
147134
},
148135
"cli": {
149-
"schematicCollections": [
150-
"@angular-eslint/schematics"
151-
],
152-
"analytics": false
136+
"analytics": false,
137+
"schematicCollections": ["@cypress/schematic", "@schematics/angular"]
138+
},
139+
"schematics": {
140+
"@angular-eslint/schematics:application": {
141+
"setParserOptionsProject": true
142+
},
143+
"@angular-eslint/schematics:library": {
144+
"setParserOptionsProject": true
145+
}
153146
}
154147
}

cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ export default defineConfig({
44
e2e: {
55
baseUrl: 'http://localhost:4200',
66
video: false,
7+
experimentalRunAllSpecs: true,
78
},
89
});

e2e/e2e.spec-helper.ts

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

e2e/protractor.conf.js

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

e2e/src/counter-finder-reuse.e2e-spec.ts

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

e2e/src/counter-helpers.e2e-spec.ts

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

e2e/src/counter-starter.e2e-spec.ts

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

0 commit comments

Comments
 (0)