diff --git a/src/lib/autocomplete/autocomplete.spec.ts b/src/lib/autocomplete/autocomplete.spec.ts index 48d96e26a83a..aa8aafa97043 100644 --- a/src/lib/autocomplete/autocomplete.spec.ts +++ b/src/lib/autocomplete/autocomplete.spec.ts @@ -976,8 +976,6 @@ describe('MatAutocomplete', () => { })); it('should close the panel when tabbing away from a trigger without results', async(() => { - const trigger = fixture.componentInstance.trigger; - fixture.componentInstance.states = []; fixture.componentInstance.filteredStates = []; fixture.detectChanges(); diff --git a/src/lib/list/selection-list.spec.ts b/src/lib/list/selection-list.spec.ts index fe492891afa0..5c78bfda2438 100644 --- a/src/lib/list/selection-list.spec.ts +++ b/src/lib/list/selection-list.spec.ts @@ -229,21 +229,21 @@ describe('MatSelectionList', () => { }); describe('with list option selected', () => { - let fixture: ComponentFixture; + let fixture: ComponentFixture; let listItemEl: DebugElement; let selectionList: DebugElement; beforeEach(async(() => { TestBed.configureTestingModule({ imports: [MatListModule], - declarations: [SelectionListWithSelecedOption], + declarations: [SelectionListWithSelectedOption], }); TestBed.compileComponents(); })); beforeEach(async(() => { - fixture = TestBed.createComponent(SelectionListWithSelecedOption); + fixture = TestBed.createComponent(SelectionListWithSelectedOption); listItemEl = fixture.debugElement.query(By.directive(MatListOption)); selectionList = fixture.debugElement.query(By.directive(MatSelectionList)); fixture.detectChanges(); @@ -496,9 +496,9 @@ class SelectionListWithDisabledOption { @Component({template: ` - Item + Item `}) -class SelectionListWithSelecedOption { +class SelectionListWithSelectedOption { } @Component({template: ` diff --git a/src/lib/menu/menu-directive.ts b/src/lib/menu/menu-directive.ts index aa14055003b7..d599e4ac58e4 100644 --- a/src/lib/menu/menu-directive.ts +++ b/src/lib/menu/menu-directive.ts @@ -32,7 +32,6 @@ import { import {Observable} from 'rxjs/Observable'; import {merge} from 'rxjs/observable/merge'; import {Subscription} from 'rxjs/Subscription'; -import {Subject} from 'rxjs/Subject'; import {fadeInItems, transformMenu} from './menu-animations'; import {throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY} from './menu-errors'; import {MatMenuItem} from './menu-item'; diff --git a/src/lib/select/select.spec.ts b/src/lib/select/select.spec.ts index 93fafbcc1d1f..56769e54ef4b 100644 --- a/src/lib/select/select.spec.ts +++ b/src/lib/select/select.spec.ts @@ -879,10 +879,10 @@ describe('MatSelect', () => { fixture.debugElement.query(By.css('.mat-select-trigger')).nativeElement.click(); fixture.detectChanges(); - (overlayContainerElement.querySelector('md-option') as HTMLElement).click(); + (overlayContainerElement.querySelector('mat-option') as HTMLElement).click(); fixture.detectChanges(); - const select = fixture.debugElement.nativeElement.querySelector('md-select'); + const select = fixture.debugElement.nativeElement.querySelector('mat-select'); expect(document.activeElement).toBe(select, 'Expected trigger to be focused.'); }); @@ -2347,7 +2347,7 @@ describe('MatSelect', () => { }); it('should only emit one event when pressing the arrow keys on a closed select', () => { - const select = fixture.debugElement.query(By.css('md-select')).nativeElement; + const select = fixture.debugElement.query(By.css('mat-select')).nativeElement; dispatchKeyboardEvent(select, 'keydown', DOWN_ARROW); expect(fixture.componentInstance.changeListener).toHaveBeenCalledTimes(1); diff --git a/src/lib/sidenav/drawer.ts b/src/lib/sidenav/drawer.ts index b17f9e03d162..175485fdb0b4 100644 --- a/src/lib/sidenav/drawer.ts +++ b/src/lib/sidenav/drawer.ts @@ -37,7 +37,6 @@ import {first} from 'rxjs/operator/first'; import {startWith} from 'rxjs/operator/startWith'; import {takeUntil} from 'rxjs/operator/takeUntil'; import {Subject} from 'rxjs/Subject'; -import {Subscription} from 'rxjs/Subscription'; /** Throws an exception when two MatDrawer are matching the same position. */ diff --git a/src/lib/slide-toggle/slide-toggle.spec.ts b/src/lib/slide-toggle/slide-toggle.spec.ts index c4234540c725..3c360b656ec4 100644 --- a/src/lib/slide-toggle/slide-toggle.spec.ts +++ b/src/lib/slide-toggle/slide-toggle.spec.ts @@ -894,7 +894,7 @@ class SlideToggleWithoutLabel { } @Component({ - template: `` + template: `` }) class SlideToggleWithModelAndChangeEvent { checked: boolean; diff --git a/src/lib/stepper/step-header.ts b/src/lib/stepper/step-header.ts index ccba9d7da358..90fdadcefb8d 100644 --- a/src/lib/stepper/step-header.ts +++ b/src/lib/stepper/step-header.ts @@ -9,7 +9,6 @@ import {FocusMonitor} from '@angular/cdk/a11y'; import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; import {Component, Input, ViewEncapsulation, ElementRef, OnDestroy, Renderer2} from '@angular/core'; -import {MATERIAL_COMPATIBILITY_MODE} from '@angular/material/core'; import {MatStepLabel} from './step-label'; diff --git a/src/lib/tooltip/tooltip.spec.ts b/src/lib/tooltip/tooltip.spec.ts index 95a5cb074ced..1e27a1432590 100644 --- a/src/lib/tooltip/tooltip.spec.ts +++ b/src/lib/tooltip/tooltip.spec.ts @@ -171,19 +171,21 @@ describe('MatTooltip', () => { expect(tooltipDirective._isTooltipVisible()).toBe(false); })); - it('should not show if hide is called before delay finishes', fakeAsync(() => { + it('should not show if hide is called before delay finishes', async(() => { expect(tooltipDirective._tooltipInstance).toBeUndefined(); const tooltipDelay = 1000; + tooltipDirective.show(tooltipDelay); expect(tooltipDirective._isTooltipVisible()).toBe(false); fixture.detectChanges(); expect(overlayContainerElement.textContent).toContain(''); - tooltipDirective.hide(); - tick(tooltipDelay); - expect(tooltipDirective._isTooltipVisible()).toBe(false); + + fixture.whenStable().then(() => { + expect(tooltipDirective._isTooltipVisible()).toBe(false); + }); })); it('should not show tooltip if message is not present or empty', () => {