diff --git a/package.json b/package.json index de9a1083697..081d672cffb 100644 --- a/package.json +++ b/package.json @@ -23,19 +23,19 @@ "node": ">= 4.2.1 < 5" }, "dependencies": { - "@angular/common": "2.0.0-rc.6", - "@angular/compiler": "2.0.0-rc.6", - "@angular/core": "2.0.0-rc.6", - "@angular/forms": "2.0.0-rc.6", - "@angular/http": "2.0.0-rc.6", - "@angular/platform-browser": "2.0.0-rc.6", - "@angular/platform-browser-dynamic": "2.0.0-rc.6", - "@angular/router": "3.0.0-rc.2", + "@angular/common": "^2.0.0", + "@angular/compiler": "^2.0.0", + "@angular/core": "^2.0.0", + "@angular/forms": "^2.0.0", + "@angular/http": "^2.0.0", + "@angular/platform-browser": "^2.0.0", + "@angular/platform-browser-dynamic": "^2.0.0", + "@angular/router": "^3.0.0", "core-js": "^2.4.1", "hammerjs": "^2.0.8", - "rxjs": "5.0.0-beta.11", - "systemjs": "0.19.31", - "zone.js": "0.6.17" + "rxjs": "5.0.0-beta.12", + "systemjs": "0.19.38", + "zone.js": "^0.6.23" }, "devDependencies": { "@angular/compiler-cli": "0.6.0", @@ -71,7 +71,7 @@ "merge2": "^1.0.2", "minimist": "^1.2.0", "node-sass": "^3.4.2", - "protractor": "^3.3.0", + "protractor": "^4.0.8", "protractor-accessibility-plugin": "0.1.1", "resolve-bin": "^0.4.0", "rollup": "^0.34.13", diff --git a/src/lib/button-toggle/button-toggle.spec.ts b/src/lib/button-toggle/button-toggle.spec.ts index ab93e493c71..0841608e6a6 100644 --- a/src/lib/button-toggle/button-toggle.spec.ts +++ b/src/lib/button-toggle/button-toggle.spec.ts @@ -46,7 +46,7 @@ describe('MdButtonToggle', () => { let buttonToggleInstances: MdButtonToggle[]; let testComponent: ButtonTogglesInsideButtonToggleGroup; - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(ButtonTogglesInsideButtonToggleGroup); fixture.detectChanges(); @@ -65,7 +65,7 @@ describe('MdButtonToggle', () => { .map(debugEl => debugEl.nativeElement); buttonToggleInstances = buttonToggleDebugElements.map(debugEl => debugEl.componentInstance); - })); + }); it('should set individual button toggle names based on the group name', () => { expect(groupInstance.name).toBeTruthy(); @@ -326,7 +326,7 @@ describe('MdButtonToggle', () => { describe('with initial value and change event', () => { - it('should not fire an initial change event', async(() => { + it('should not fire an initial change event', () => { let fixture = TestBed.createComponent(ButtonToggleGroupWithInitialValue); let testComponent = fixture.debugElement.componentInstance; let groupDebugElement = fixture.debugElement.query(By.directive(MdButtonToggleGroup)); @@ -342,7 +342,7 @@ describe('MdButtonToggle', () => { expect(groupInstance.value).toBe('green'); expect(testComponent.lastEvent.value).toBe('green'); - })); + }); }); diff --git a/src/lib/checkbox/checkbox.spec.ts b/src/lib/checkbox/checkbox.spec.ts index 0c5d14fde75..ce900d1c990 100644 --- a/src/lib/checkbox/checkbox.spec.ts +++ b/src/lib/checkbox/checkbox.spec.ts @@ -45,7 +45,7 @@ describe('MdCheckbox', () => { let inputElement: HTMLInputElement; let labelElement: HTMLLabelElement; - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(SingleCheckbox); fixture.detectChanges(); @@ -55,7 +55,7 @@ describe('MdCheckbox', () => { testComponent = fixture.debugElement.componentInstance; inputElement = checkboxNativeElement.querySelector('input'); labelElement = checkboxNativeElement.querySelector('label'); - })); + }); it('should add and remove the checked state', () => { expect(checkboxInstance.checked).toBe(false); @@ -318,7 +318,7 @@ describe('MdCheckbox', () => { let inputElement: HTMLInputElement; let labelElement: HTMLLabelElement; - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(CheckboxWithChangeEvent); fixture.detectChanges(); @@ -328,7 +328,7 @@ describe('MdCheckbox', () => { testComponent = fixture.debugElement.componentInstance; inputElement = checkboxNativeElement.querySelector('input'); labelElement = checkboxNativeElement.querySelector('label'); - })); + }); it('should emit the event to the change observable', () => { let changeSpy = jasmine.createSpy('onChangeObservable'); @@ -370,7 +370,7 @@ describe('MdCheckbox', () => { let checkboxNativeElement: HTMLElement; let inputElement: HTMLInputElement; - it('should use the provided aria-label', async(() => { + it('should use the provided aria-label', () => { fixture = TestBed.createComponent(CheckboxWithAriaLabel); checkboxDebugElement = fixture.debugElement.query(By.directive(MdCheckbox)); checkboxNativeElement = checkboxDebugElement.nativeElement; @@ -378,7 +378,7 @@ describe('MdCheckbox', () => { fixture.detectChanges(); expect(inputElement.getAttribute('aria-label')).toBe('Super effective'); - })); + }); }); describe('with provided aria-labelledby ', () => { @@ -386,7 +386,7 @@ describe('MdCheckbox', () => { let checkboxNativeElement: HTMLElement; let inputElement: HTMLInputElement; - it('should use the provided aria-labelledby', async(() => { + it('should use the provided aria-labelledby', () => { fixture = TestBed.createComponent(CheckboxWithAriaLabelledby); checkboxDebugElement = fixture.debugElement.query(By.directive(MdCheckbox)); checkboxNativeElement = checkboxDebugElement.nativeElement; @@ -394,9 +394,9 @@ describe('MdCheckbox', () => { fixture.detectChanges(); expect(inputElement.getAttribute('aria-labelledby')).toBe('some-id'); - })); + }); - it('should not assign aria-labelledby if none is provided', async(() => { + it('should not assign aria-labelledby if none is provided', () => { fixture = TestBed.createComponent(SingleCheckbox); checkboxDebugElement = fixture.debugElement.query(By.directive(MdCheckbox)); checkboxNativeElement = checkboxDebugElement.nativeElement; @@ -404,7 +404,7 @@ describe('MdCheckbox', () => { fixture.detectChanges(); expect(inputElement.getAttribute('aria-labelledby')).toBe(null); - })); + }); }); describe('with provided tabIndex', () => { @@ -414,7 +414,7 @@ describe('MdCheckbox', () => { let inputElement: HTMLInputElement; let labelElement: HTMLLabelElement; - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(CheckboxWithTabIndex); fixture.detectChanges(); @@ -423,11 +423,11 @@ describe('MdCheckbox', () => { checkboxNativeElement = checkboxDebugElement.nativeElement; inputElement = checkboxNativeElement.querySelector('input'); labelElement = checkboxNativeElement.querySelector('label'); - })); + }); - it('should preserve any given tabIndex', async(() => { + it('should preserve any given tabIndex', () => { expect(inputElement.tabIndex).toBe(7); - })); + }); it('should preserve given tabIndex when the checkbox is disabled then enabled', () => { testComponent.isDisabled = true; @@ -444,10 +444,10 @@ describe('MdCheckbox', () => { }); describe('with multiple checkboxes', () => { - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(MultipleCheckboxes); fixture.detectChanges(); - })); + }); it('should assign a unique id to each checkbox', () => { let [firstId, secondId] = @@ -461,10 +461,10 @@ describe('MdCheckbox', () => { }); describe('with ngModel', () => { - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(CheckboxWithFormDirectives); fixture.detectChanges(); - })); + }); it('should be in pristine, untouched, and valid states initially', fakeAsync(() => { flushMicrotasks(); @@ -482,17 +482,17 @@ describe('MdCheckbox', () => { }); describe('with name attribute', () => { - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(CheckboxWithNameAttribute); fixture.detectChanges(); - })); + }); - it('should forward name value to input element', fakeAsync(() => { + it('should forward name value to input element', () => { let checkboxElement = fixture.debugElement.query(By.directive(MdCheckbox)); let inputElement = checkboxElement.nativeElement.querySelector('input'); expect(inputElement.getAttribute('name')).toBe('test-name'); - })); + }); }); }); diff --git a/src/lib/core/overlay/overlay-directives.spec.ts b/src/lib/core/overlay/overlay-directives.spec.ts index 963963d7764..04b539d9550 100644 --- a/src/lib/core/overlay/overlay-directives.spec.ts +++ b/src/lib/core/overlay/overlay-directives.spec.ts @@ -1,4 +1,4 @@ -import {async, fakeAsync, flushMicrotasks, ComponentFixture, TestBed} from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; import {Component, ViewChild} from '@angular/core'; import {ConnectedOverlayDirective, OverlayModule} from './overlay-directives'; import {OverlayContainer} from './overlay-container'; @@ -9,7 +9,7 @@ describe('Overlay directives', () => { let overlayContainerElement: HTMLElement; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(() => { TestBed.configureTestingModule({ imports: [OverlayModule.forRoot()], declarations: [ConnectedOverlayDirectiveTest], @@ -20,23 +20,22 @@ describe('Overlay directives', () => { }} ], }); - })); + }); - beforeEach(async(() => { + beforeEach(() => { fixture = TestBed.createComponent(ConnectedOverlayDirectiveTest); fixture.detectChanges(); - })); + }); it(`should create an overlay and attach the directive's template`, () => { expect(overlayContainerElement.textContent).toContain('Menu content'); }); - it('should destroy the overlay when the directive is destroyed', fakeAsync(() => { + it('should destroy the overlay when the directive is destroyed', () => { fixture.destroy(); - flushMicrotasks(); expect(overlayContainerElement.textContent.trim()).toBe(''); - })); + }); it('should use a connected position strategy with a default set of positions', () => { let testComponent: ConnectedOverlayDirectiveTest = diff --git a/src/lib/core/portal/portal.spec.ts b/src/lib/core/portal/portal.spec.ts index 670cbb8f42a..291a9e36f6b 100644 --- a/src/lib/core/portal/portal.spec.ts +++ b/src/lib/core/portal/portal.spec.ts @@ -1,11 +1,4 @@ -import { - inject, - fakeAsync, - flushMicrotasks, - ComponentFixture, - TestBed, - async, -} from '@angular/core/testing'; +import {inject, ComponentFixture, TestBed, async} from '@angular/core/testing'; import { NgModule, Component, @@ -34,25 +27,22 @@ describe('Portals', () => { describe('PortalHostDirective', () => { let fixture: ComponentFixture; - beforeEach(fakeAsync(() => { + beforeEach(() => { fixture = TestBed.createComponent(PortalTestApp); - })); + }); - it('should load a component into the portal', fakeAsync(() => { + it('should load a component into the portal', () => { // Set the selectedHost to be a ComponentPortal. let testAppComponent = fixture.debugElement.componentInstance; testAppComponent.selectedPortal = new ComponentPortal(PizzaMsg); fixture.detectChanges(); - // Flush the attachment of the Portal. - flushMicrotasks(); - // Expect that the content of the attached portal is present. let hostContainer = fixture.nativeElement.querySelector('.portal-container'); expect(hostContainer.textContent).toContain('Pizza'); - })); + }); - it('should load a component into the portal with a given injector', fakeAsync(() => { + it('should load a component into the portal with a given injector', () => { // Create a custom injector for the component. let chocolateInjector = new ChocolateInjector(fixture.componentInstance.injector); @@ -61,17 +51,13 @@ describe('Portals', () => { testAppComponent.selectedPortal = new ComponentPortal(PizzaMsg, null, chocolateInjector); fixture.detectChanges(); - // Flush the attachment of the Portal. - flushMicrotasks(); - fixture.detectChanges(); - // Expect that the content of the attached portal is present. let hostContainer = fixture.nativeElement.querySelector('.portal-container'); expect(hostContainer.textContent).toContain('Pizza'); expect(hostContainer.textContent).toContain('Chocolate'); - })); + }); - it('should load a