Skip to content

Commit

Permalink
feat: update to Angular 4.3 (#6483)
Browse files Browse the repository at this point in the history
* feat: update to Angular 4.3

* Bumps the Angular requirement to 4.3. This is also a prerequisite to the Angular 5 update since we encountered the same errors there.
* Refactors the sidenav not to use a `Promise.resolve` for toggling the initial animation, because it was making it impossible to flush the animations in unit tests. The new simplified approach uses a property to pass the animation state.
* Fixes the nested menu test failures.
* Fixes a "changed after checked" error in the autocomplete demo app.

Relates to #6454.

* fix: e2e failures
  • Loading branch information
crisbeto authored and andrewseguin committed Aug 16, 2017
1 parent 1807c5b commit 66da597
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 149 deletions.
3 changes: 2 additions & 1 deletion e2e/components/menu-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ describe('menu', () => {

it('should mirror classes on host to menu template in overlay', () => {
page.trigger().click();
expect(page.menu().getAttribute('class')).toContain('mat-menu-panel custom');
expect(page.menu().getAttribute('class')).toContain('mat-menu-panel');
expect(page.menu().getAttribute('class')).toContain('custom');
});

describe('keyboard events', () => {
Expand Down
2 changes: 2 additions & 0 deletions e2e/components/sidenav-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ describe('sidenav', () => {

it('should close again', () => {
element(by.buttonText('Open sidenav')).click();
browser.sleep(50);
element(by.buttonText('Open sidenav')).click();

expect(sidenav.isDisplayed()).toBeFalsy();
});
});
Expand Down
128 changes: 81 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,29 @@
"version": "2.0.0-beta.8",
"license": "MIT",
"engines": {
"node": ">= 5.4.1 < 7"
"node": ">= 5.4.1"
},
"dependencies": {
"@angular/animations": "~4.1.0",
"@angular/common": "~4.1.0",
"@angular/compiler": "~4.1.0",
"@angular/core": "~4.1.0",
"@angular/forms": "~4.1.0",
"@angular/http": "~4.1.0",
"@angular/platform-browser": "~4.1.0",
"@angular/animations": "~4.3.0",
"@angular/common": "~4.3.0",
"@angular/compiler": "~4.3.0",
"@angular/core": "~4.3.0",
"@angular/forms": "~4.3.0",
"@angular/http": "~4.3.0",
"@angular/platform-browser": "~4.3.0",
"core-js": "^2.4.1",
"rxjs": "^5.0.1",
"systemjs": "0.19.43",
"tsickle": "^0.23.5",
"tslib": "^1.7.1",
"zone.js": "^0.8.4"
"zone.js": "^0.8.12"
},
"devDependencies": {
"@angular/compiler-cli": "~4.1.0",
"@angular/platform-browser-dynamic": "~4.1.0",
"@angular/platform-server": "~4.1.0",
"@angular/router": "~4.1.0",
"@angular/tsc-wrapped": "~4.1.0",
"@angular/compiler-cli": "~4.3.0",
"@angular/platform-browser-dynamic": "~4.3.0",
"@angular/platform-server": "~4.3.0",
"@angular/router": "~4.3.0",
"@angular/tsc-wrapped": "~4.3.0",
"@google-cloud/storage": "^1.1.1",
"@types/chalk": "^0.4.31",
"@types/fs-extra": "^3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"homepage": "https://github.com/angular/material2#readme",
"peerDependencies": {
"@angular/core": "^4.0.0",
"@angular/common": "^4.0.0"
"@angular/core": "^4.3.0",
"@angular/common": "^4.3.0"
},
"dependencies": {
"tslib": "^1.7.1"
Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/autocomplete/autocomplete-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<md-card>

<div>Template-driven value (currentState): {{ currentState }}</div>
<div>Template-driven dirty: {{ modelDir?.dirty }}</div>
<div>Template-driven dirty: {{ modelDir ? modelDir.dirty : false }}</div>

<!-- Added an ngIf below to test that autocomplete works with ngIf -->
<md-form-field *ngIf="true">
Expand Down
Loading

0 comments on commit 66da597

Please sign in to comment.