Skip to content

Commit 32d4b4e

Browse files
DeborahKDeborahK
DeborahK
authored and
DeborahK
committed
Update to Angular v11
1 parent c30c801 commit 32d4b4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+30245
-270
lines changed

APM-Final/.browserslistrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ last 2 Edge major versions
1414
last 2 Safari major versions
1515
last 2 iOS major versions
1616
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.
1817
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

APM-Final/README.md

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

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.3.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.0.
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.

APM-Final/angular.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": "25966e0b-559a-45fe-b9d4-ae4bd482836a"
5+
},
36
"version": 1,
47
"newProjectRoot": "projects",
58
"projects": {
69
"apm": {
710
"projectType": "application",
8-
"schematics": {},
11+
"schematics": {
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
916
"root": "",
1017
"sourceRoot": "src",
1118
"prefix": "pm",
@@ -40,21 +47,20 @@
4047
"optimization": true,
4148
"outputHashing": "all",
4249
"sourceMap": false,
43-
"extractCss": true,
4450
"namedChunks": false,
4551
"extractLicenses": true,
4652
"vendorChunk": false,
4753
"buildOptimizer": true,
4854
"budgets": [
4955
{
5056
"type": "initial",
51-
"maximumWarning": "2mb",
52-
"maximumError": "5mb"
57+
"maximumWarning": "500kb",
58+
"maximumError": "1mb"
5359
},
5460
{
5561
"type": "anyComponentStyle",
56-
"maximumWarning": "6kb",
57-
"maximumError": "10kb"
62+
"maximumWarning": "2kb",
63+
"maximumError": "4kb"
5864
}
5965
]
6066
}
@@ -122,8 +128,5 @@
122128
}
123129
}
124130
},
125-
"defaultProject": "apm",
126-
"cli": {
127-
"analytics": "7b76e241-5622-4743-80f5-0abc7119f349"
128-
}
131+
"defaultProject": "apm"
129132
}

APM-Final/e2e/protractor.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports.config = {
1616
browserName: 'chrome'
1717
},
1818
directConnect: true,
19+
SELENIUM_PROMISE_MANAGER: false,
1920
baseUrl: 'http://localhost:4200/',
2021
framework: 'jasmine',
2122
jasmineNodeOpts: {

APM-Final/e2e/src/app.e2e-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AppPage } from './app.po';
21
import { browser, logging } from 'protractor';
2+
import { AppPage } from './app.po';
33

44
describe('workspace-project App', () => {
55
let page: AppPage;
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('Welcome to Angular: Getting Started!!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
expect(await page.getTitleText()).toEqual('Welcome to Angular: Getting Started!!');
1414
});
1515

1616
afterEach(async () => {

APM-Final/e2e/src/app.po.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { browser, by, element } from 'protractor';
22

33
export class AppPage {
4-
navigateTo(): Promise<unknown> {
5-
return browser.get(browser.baseUrl) as Promise<unknown>;
4+
async navigateTo(): Promise<unknown> {
5+
return browser.get(browser.baseUrl);
66
}
77

8-
getTitleText(): Promise<string> {
9-
return element(by.css('pm-root h1')).getText() as Promise<string>;
8+
async getTitleText(): Promise<string> {
9+
return element(by.css('pm-root h1')).getText();
1010
}
1111
}

APM-Final/e2e/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "../tsconfig.base.json",
3+
"extends": "../tsconfig.json",
44
"compilerOptions": {
55
"outDir": "../out-tsc/e2e",
66
"module": "commonjs",
77
"target": "es2018",
88
"types": [
99
"jasmine",
10-
"jasminewd2",
1110
"node"
1211
]
1312
}

APM-Final/karma.conf.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,28 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
1928
dir: require('path').join(__dirname, './coverage/apm'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,

0 commit comments

Comments
 (0)