From 79092bddaad7e3492f7e033c95abee951d5048df Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Sat, 10 Jun 2017 01:08:50 +0200 Subject: [PATCH] fix(snack-bar): test error in IE (#5048) 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');