Skip to content

Commit 235eb43

Browse files
committed
test: update base project for E2E tests to version 15
Update the base update E2E test project to the minimum supported Angular version. (cherry picked from commit 442d7bc)
1 parent e433d7f commit 235eb43

28 files changed

+71
-241
lines changed

tests/legacy-cli/e2e/assets/14.0-project/.browserslistrc

-16
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/karma.conf.js

-44
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/package.json

-38
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/src/environments/environment.prod.ts

-3
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/src/environments/environment.ts

-16
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/src/polyfills.ts

-53
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/src/test.ts

-26
This file was deleted.

tests/legacy-cli/e2e/assets/14.0-project/README.md renamed to tests/legacy-cli/e2e/assets/15.0-project/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# FourteenProject
1+
# FifteenProject
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.5.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.8.
44

55
## Development server
66

tests/legacy-cli/e2e/assets/14.0-project/angular.json renamed to tests/legacy-cli/e2e/assets/15.0-project/angular.json

+12-15
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"fourteen-project": {
6+
"fifteen-project": {
77
"projectType": "application",
88
"schematics": {},
99
"root": "",
@@ -13,10 +13,12 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"outputPath": "dist/fourteen-project",
16+
"outputPath": "dist/fifteen-project",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
19-
"polyfills": "src/polyfills.ts",
19+
"polyfills": [
20+
"zone.js"
21+
],
2022
"tsConfig": "tsconfig.app.json",
2123
"assets": [
2224
"src/favicon.ico",
@@ -41,12 +43,6 @@
4143
"maximumError": "4kb"
4244
}
4345
],
44-
"fileReplacements": [
45-
{
46-
"replace": "src/environments/environment.ts",
47-
"with": "src/environments/environment.prod.ts"
48-
}
49-
],
5046
"outputHashing": "all"
5147
},
5248
"development": {
@@ -64,27 +60,28 @@
6460
"builder": "@angular-devkit/build-angular:dev-server",
6561
"configurations": {
6662
"production": {
67-
"browserTarget": "fourteen-project:build:production"
63+
"browserTarget": "fifteen-project:build:production"
6864
},
6965
"development": {
70-
"browserTarget": "fourteen-project:build:development"
66+
"browserTarget": "fifteen-project:build:development"
7167
}
7268
},
7369
"defaultConfiguration": "development"
7470
},
7571
"extract-i18n": {
7672
"builder": "@angular-devkit/build-angular:extract-i18n",
7773
"options": {
78-
"browserTarget": "fourteen-project:build"
74+
"browserTarget": "fifteen-project:build"
7975
}
8076
},
8177
"test": {
8278
"builder": "@angular-devkit/build-angular:karma",
8379
"options": {
84-
"main": "src/test.ts",
85-
"polyfills": "src/polyfills.ts",
80+
"polyfills": [
81+
"zone.js",
82+
"zone.js/testing"
83+
],
8684
"tsConfig": "tsconfig.spec.json",
87-
"karmaConfig": "karma.conf.js",
8885
"assets": [
8986
"src/favicon.ico",
9087
"src/assets"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "fifteen-project",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
9+
"test": "ng test"
10+
},
11+
"private": true,
12+
"dependencies": {
13+
"@angular/animations": "^15.2.0",
14+
"@angular/common": "^15.2.0",
15+
"@angular/compiler": "^15.2.0",
16+
"@angular/core": "^15.2.0",
17+
"@angular/forms": "^15.2.0",
18+
"@angular/platform-browser": "^15.2.0",
19+
"@angular/platform-browser-dynamic": "^15.2.0",
20+
"@angular/router": "^15.2.0",
21+
"rxjs": "~7.8.0",
22+
"tslib": "^2.3.0",
23+
"zone.js": "~0.12.0"
24+
},
25+
"devDependencies": {
26+
"@angular-devkit/build-angular": "^15.2.8",
27+
"@angular/cli": "~15.2.8",
28+
"@angular/compiler-cli": "^15.2.0",
29+
"@types/jasmine": "~4.3.0",
30+
"jasmine-core": "~4.5.0",
31+
"karma": "~6.4.0",
32+
"karma-chrome-launcher": "~3.1.0",
33+
"karma-coverage": "~2.2.0",
34+
"karma-jasmine": "~5.1.0",
35+
"karma-jasmine-html-reporter": "~2.0.0",
36+
"typescript": "~4.9.4"
37+
}
38+
}

tests/legacy-cli/e2e/assets/14.0-project/src/app/app.component.html renamed to tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
<!-- Toolbar -->
306306
<div class="toolbar" role="banner">
307307
<img
308-
width="40"
308+
width="40"
309309
alt="Angular Logo"
310310
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
311311
/>

tests/legacy-cli/e2e/assets/14.0-project/src/app/app.component.spec.ts renamed to tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ describe('AppComponent', () => {
2020
expect(app).toBeTruthy();
2121
});
2222

23-
it(`should have as title 'fourteen-project'`, () => {
23+
it(`should have as title 'fifteen-project'`, () => {
2424
const fixture = TestBed.createComponent(AppComponent);
2525
const app = fixture.componentInstance;
26-
expect(app.title).toEqual('fourteen-project');
26+
expect(app.title).toEqual('fifteen-project');
2727
});
2828

2929
it('should render title', () => {
3030
const fixture = TestBed.createComponent(AppComponent);
3131
fixture.detectChanges();
3232
const compiled = fixture.nativeElement as HTMLElement;
33-
expect(compiled.querySelector('.content span')?.textContent).toContain('fourteen-project app is running!');
33+
expect(compiled.querySelector('.content span')?.textContent).toContain('fifteen-project app is running!');
3434
});
3535
});

tests/legacy-cli/e2e/assets/14.0-project/src/app/app.component.ts renamed to tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
66
styleUrls: ['./app.component.css']
77
})
88
export class AppComponent {
9-
title = 'fourteen-project';
9+
title = 'fifteen-project';
1010
}

tests/legacy-cli/e2e/assets/14.0-project/src/index.html renamed to tests/legacy-cli/e2e/assets/15.0-project/src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>FourteenProject</title>
5+
<title>FifteenProject</title>
66
<base href="/">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<link rel="icon" type="image/x-icon" href="favicon.ico">
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import { enableProdMode } from '@angular/core';
21
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
32

43
import { AppModule } from './app/app.module';
5-
import { environment } from './environments/environment';
64

7-
if (environment.production) {
8-
enableProdMode();
9-
}
105

116
platformBrowserDynamic().bootstrapModule(AppModule)
127
.catch(err => console.error(err));

tests/legacy-cli/e2e/assets/14.0-project/tsconfig.app.json renamed to tests/legacy-cli/e2e/assets/15.0-project/tsconfig.app.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"types": []
77
},
88
"files": [
9-
"src/main.ts",
10-
"src/polyfills.ts"
9+
"src/main.ts"
1110
],
1211
"include": [
1312
"src/**/*.d.ts"

0 commit comments

Comments
 (0)