From 3463bea656aa8a932bfe69af0899dd8e1571adc6 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Fri, 9 Jun 2017 20:00:49 +0200 Subject: [PATCH] fix(snack-bar): test error in IE Fixes a silent error that was being logged by IE when running the snack bar tests. It seems to be due to the specific test case not triggering change detection and not passing in a `viewContainerRef` so it could be triggered automatically. --- src/lib/snack-bar/snack-bar.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/snack-bar/snack-bar.spec.ts b/src/lib/snack-bar/snack-bar.spec.ts index 76e085c494c5..928bb1d3d4ec 100644 --- a/src/lib/snack-bar/snack-bar.spec.ts +++ b/src/lib/snack-bar/snack-bar.spec.ts @@ -329,10 +329,8 @@ describe('MdSnackBar', () => { })); it('should add extra classes to the container', () => { - snackBar.open(simpleMessage, simpleActionLabel, { - viewContainerRef: testViewContainerRef, - extraClasses: ['one', 'two'] - }); + snackBar.open(simpleMessage, simpleActionLabel, { extraClasses: ['one', 'two'] }); + viewContainerFixture.detectChanges(); let containerClasses = overlayContainerElement.querySelector('snack-bar-container').classList; @@ -342,6 +340,7 @@ describe('MdSnackBar', () => { it('should set the layout direction', () => { snackBar.open(simpleMessage, simpleActionLabel, { direction: 'rtl' }); + viewContainerFixture.detectChanges(); let pane = overlayContainerElement.querySelector('.cdk-overlay-pane');