Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions tests/legacy-cli/e2e/assets/18.0-project/README.md

This file was deleted.

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

This file was deleted.

59 changes: 59 additions & 0 deletions tests/legacy-cli/e2e/assets/19.0-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# NineteenProject

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

## Development server

To start a local development server, run:

```bash
ng serve
```

Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.

## Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

```bash
ng generate component component-name
```

For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:

```bash
ng generate --help
```

## Building

To build the project run:

```bash
ng build
```

This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.

## Running unit tests

To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:

```bash
ng test
```

## Running end-to-end tests

For end-to-end (e2e) testing, run:

```bash
ng e2e
```

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

## Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"eighteen-project": {
"nineteen-project": {
"projectType": "application",
"schematics": {},
"root": "",
Expand All @@ -13,7 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/eighteen-project",
"outputPath": "dist/nineteen-project",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
Expand Down Expand Up @@ -41,8 +41,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
Expand All @@ -59,10 +59,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "eighteen-project:build:production"
"buildTarget": "nineteen-project:build:production"
},
"development": {
"buildTarget": "eighteen-project:build:development"
"buildTarget": "nineteen-project:build:development"
}
},
"defaultConfiguration": "development"
Expand Down
37 changes: 37 additions & 0 deletions tests/legacy-cli/e2e/assets/19.0-project/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "nineteen-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/common": "^19.2.0",
"@angular/compiler": "^19.2.0",
"@angular/core": "^19.2.0",
"@angular/forms": "^19.2.0",
"@angular/platform-browser": "^19.2.0",
"@angular/platform-browser-dynamic": "^19.2.0",
"@angular/router": "^19.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^19.2.13",
"@angular/cli": "^19.2.13",
"@angular/compiler-cli": "^19.2.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.7.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

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

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, eighteen-project');
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, nineteen-project');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { RouterOutlet } from '@angular/router';

@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'eighteen-project';
title = 'nineteen-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>EighteenProject</title>
<title>NineteenProject</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
Expand Up @@ -12,17 +12,11 @@
"skipLibCheck": true,
"isolatedModules": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"lib": [
"ES2022",
"dom"
]
"module": "ES2022"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { expectToFail } from '../../utils/utils';
export default async function () {
let restoreRegistry: (() => Promise<void>) | undefined;
try {
restoreRegistry = await createProjectFromAsset('18.0-project', true);
restoreRegistry = await createProjectFromAsset('19.0-project', true);
await setRegistry(true);

const extraArgs = ['--force'];
Expand Down
14 changes: 7 additions & 7 deletions tests/legacy-cli/e2e/tests/update/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export default async function () {
try {
// We need to use the public registry because in the local NPM server we don't have
// older versions @angular/cli packages which would cause `npm install` during `ng update` to fail.
restoreRegistry = await createProjectFromAsset('18.0-project', true);
restoreRegistry = await createProjectFromAsset('19.0-project', true);

// CLI project version
const cliMajorProjectVersion = 18;
const cliMajorProjectVersion = 19;

// If using npm, enable legacy peer deps mode to avoid defects in npm 7+'s peer dependency resolution
// Example error where 11.2.14 satisfies the SemVer range ^11.0.0 but still fails:
Expand Down Expand Up @@ -71,12 +71,12 @@ export default async function () {
await ng('update', '@angular/cli', ...extraUpdateArgs);

// Generate E2E setup
await ng('generate', 'private-e2e', '--related-app-name=eighteen-project');
await ng('generate', 'private-e2e', '--related-app-name=nineteen-project');

// Setup testing to use CI Chrome.
await useCIChrome('eighteen-project', './');
await useCIChrome('eighteen-project', './e2e/');
await useCIDefaults('eighteen-project');
await useCIChrome('nineteen-project', './');
await useCIChrome('nineteen-project', './e2e/');
await useCIDefaults('nineteen-project');

// Run CLI commands.
await ng('generate', 'component', 'my-comp');
Expand All @@ -87,5 +87,5 @@ export default async function () {

// Verify project now creates bundles
await noSilentNg('build', '--configuration=production');
await expectFileMatchToExist('dist/eighteen-project/browser', /main-[a-zA-Z0-9]{8}\.js/);
await expectFileMatchToExist('dist/nineteen-project/browser', /main-[a-zA-Z0-9]{8}\.js/);
}