Skip to content

Commit

Permalink
test: update base project for E2E tests to version 15
Browse files Browse the repository at this point in the history
Update the base update E2E test project to the minimum supported Angular version.

(cherry picked from commit 442d7bc)
  • Loading branch information
alan-agius4 committed Dec 1, 2023
1 parent e433d7f commit 235eb43
Show file tree
Hide file tree
Showing 28 changed files with 71 additions and 241 deletions.
16 changes: 0 additions & 16 deletions tests/legacy-cli/e2e/assets/14.0-project/.browserslistrc

This file was deleted.

44 changes: 0 additions & 44 deletions tests/legacy-cli/e2e/assets/14.0-project/karma.conf.js

This file was deleted.

38 changes: 0 additions & 38 deletions tests/legacy-cli/e2e/assets/14.0-project/package.json

This file was deleted.

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions tests/legacy-cli/e2e/assets/14.0-project/src/polyfills.ts

This file was deleted.

26 changes: 0 additions & 26 deletions tests/legacy-cli/e2e/assets/14.0-project/src/test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FourteenProject
# FifteenProject

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

## Development server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"fourteen-project": {
"fifteen-project": {
"projectType": "application",
"schematics": {},
"root": "",
Expand All @@ -13,10 +13,12 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/fourteen-project",
"outputPath": "dist/fifteen-project",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
Expand All @@ -41,12 +43,6 @@
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
Expand All @@ -64,27 +60,28 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "fourteen-project:build:production"
"browserTarget": "fifteen-project:build:production"
},
"development": {
"browserTarget": "fourteen-project:build:development"
"browserTarget": "fifteen-project:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "fourteen-project:build"
"browserTarget": "fifteen-project:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
Expand Down
38 changes: 38 additions & 0 deletions tests/legacy-cli/e2e/assets/15.0-project/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "fifteen-project",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^15.2.0",
"@angular/common": "^15.2.0",
"@angular/compiler": "^15.2.0",
"@angular/core": "^15.2.0",
"@angular/forms": "^15.2.0",
"@angular/platform-browser": "^15.2.0",
"@angular/platform-browser-dynamic": "^15.2.0",
"@angular/router": "^15.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.8",
"@angular/cli": "~15.2.8",
"@angular/compiler-cli": "^15.2.0",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.9.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<!-- Toolbar -->
<div class="toolbar" role="banner">
<img
width="40"
width="40"
alt="Angular Logo"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

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

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('fourteen-project app is running!');
expect(compiled.querySelector('.content span')?.textContent).toContain('fifteen-project app is running!');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'fourteen-project';
title = 'fifteen-project';
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>FourteenProject</title>
<title>FifteenProject</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
Expand Down
Loading

0 comments on commit 235eb43

Please sign in to comment.