Skip to content

Commit

Permalink
fix(snack-bar): test error in IE (#5048)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and andrewseguin committed Jun 9, 2017
1 parent 419d9da commit 79092bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/snack-bar/snack-bar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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');

Expand Down

0 comments on commit 79092bd

Please sign in to comment.