Skip to content

Commit

Permalink
Fix TS errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Feb 1, 2017
1 parent 67ceb9b commit 34a7797
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/dialog/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import {By} from '@angular/platform-browser';
import {NgModule, Component, Directive, ViewChild, ViewContainerRef, Injector} from '@angular/core';
import {MdDialogModule} from './index';
import {MdDialog} from './dialog';
import {OverlayContainer} from '../core';
import {OverlayContainer, ESCAPE} from '../core';
import {MdDialogRef} from './dialog-ref';
import {MdDialogContainer} from './dialog-container';

const FAKE_ESCAPE_KEY = { keyCode: ESCAPE } as KeyboardEvent;

describe('MdDialog', () => {
let dialog: MdDialog;
Expand Down Expand Up @@ -128,7 +129,7 @@ describe('MdDialog', () => {
viewContainerFixture.debugElement.query(By.directive(MdDialogContainer)).componentInstance;

// Fake the user pressing the escape key by calling the handler directly.
dialogContainer._handleEscapeKey();
dialogContainer._handleKeydown(FAKE_ESCAPE_KEY);
viewContainerFixture.detectChanges();

viewContainerFixture.whenStable().then(() => {
Expand Down Expand Up @@ -347,7 +348,7 @@ describe('MdDialog', () => {
By.directive(MdDialogContainer)).componentInstance;

// Fake the user pressing the escape key by calling the handler directly.
dialogContainer._handleEscapeKey();
dialogContainer._handleKeydown(FAKE_ESCAPE_KEY);

expect(overlayContainerElement.querySelector('md-dialog-container')).toBeTruthy();
});
Expand Down

0 comments on commit 34a7797

Please sign in to comment.