Skip to content

Commit 6cf9887

Browse files
alan-agius4dgp1130
authored andcommitted
test(@angular/cli): update ng-update test to start from version 10
With this change we update the `ng-update` test to start from version 10 as version 9 has been out of support for some time now.
1 parent c95ab70 commit 6cf9887

33 files changed

+176
-99
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
.yarn/
1313
dist/
1414
third_party/
15-
/tests/legacy-cli/e2e/assets/9.0-project/
15+
/tests/legacy-cli/e2e/assets/
1616
/tools/test/*.json
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
18+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

tests/legacy-cli/e2e/assets/9.0-project/README.md renamed to tests/legacy-cli/e2e/assets/10.0-project/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# NineProject
1+
# TenProject
22

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

55
## Development server
66

@@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
2424

2525
## Further help
2626

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

tests/legacy-cli/e2e/assets/9.0-project/angular.json renamed to tests/legacy-cli/e2e/assets/10.0-project/angular.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"nine-project": {
6+
"ten-project": {
77
"projectType": "application",
88
"schematics": {},
99
"root": "",
@@ -13,7 +13,7 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"outputPath": "dist/nine-project",
16+
"outputPath": "dist/ten-project",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
1919
"polyfills": "src/polyfills.ts",
@@ -57,18 +57,18 @@
5757
"serve": {
5858
"builder": "@angular-devkit/build-angular:dev-server",
5959
"options": {
60-
"browserTarget": "nine-project:build"
60+
"browserTarget": "ten-project:build"
6161
},
6262
"configurations": {
6363
"production": {
64-
"browserTarget": "nine-project:build:production"
64+
"browserTarget": "ten-project:build:production"
6565
}
6666
}
6767
},
6868
"extract-i18n": {
6969
"builder": "@angular-devkit/build-angular:extract-i18n",
7070
"options": {
71-
"browserTarget": "nine-project:build"
71+
"browserTarget": "ten-project:build"
7272
}
7373
},
7474
"test": {
@@ -94,16 +94,16 @@
9494
"builder": "@angular-devkit/build-angular:protractor",
9595
"options": {
9696
"protractorConfig": "e2e/protractor.conf.js",
97-
"devServerTarget": "nine-project:serve"
97+
"devServerTarget": "ten-project:serve"
9898
},
9999
"configurations": {
100100
"production": {
101-
"devServerTarget": "nine-project:serve:production"
101+
"devServerTarget": "ten-project:serve:production"
102102
}
103103
}
104104
}
105105
}
106106
}
107107
},
108-
"defaultProject": "nine-project"
108+
"defaultProject": "ten-project"
109109
}

tests/legacy-cli/e2e/assets/9.0-project/e2e/protractor.conf.js renamed to tests/legacy-cli/e2e/assets/10.0-project/e2e/protractor.conf.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Protractor configuration file, see link for more information
33
// https://github.com/angular/protractor/blob/master/lib/config.ts
44

5-
const { SpecReporter } = require('jasmine-spec-reporter');
5+
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
66

77
/**
88
* @type { import("protractor").Config }
@@ -25,6 +25,12 @@ exports.config = {
2525
require('ts-node').register({
2626
project: require('path').join(__dirname, './tsconfig.json'),
2727
});
28-
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
28+
jasmine.getEnv().addReporter(
29+
new SpecReporter({
30+
spec: {
31+
displayStacktrace: StacktraceOption.PRETTY,
32+
},
33+
}),
34+
);
2935
},
3036
};

tests/legacy-cli/e2e/assets/9.0-project/e2e/src/app.e2e-spec.ts renamed to tests/legacy-cli/e2e/assets/10.0-project/e2e/src/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('workspace-project App', () => {
1010

1111
it('should display welcome message', () => {
1212
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('nine-project app is running!');
13+
expect(page.getTitleText()).toEqual('ten-project app is running!');
1414
});
1515

1616
afterEach(async () => {
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
12
{
23
"extends": "../tsconfig.json",
34
"compilerOptions": {
45
"outDir": "../out-tsc/e2e",
56
"module": "commonjs",
6-
"target": "es5",
7+
"target": "es2018",
78
"types": ["jasmine", "jasminewd2", "node"]
89
}
910
}

0 commit comments

Comments
 (0)