Skip to content

Commit 79092bd

Browse files
crisbetoandrewseguin
authored andcommitted
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.
1 parent 419d9da commit 79092bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lib/snack-bar/snack-bar.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,8 @@ describe('MdSnackBar', () => {
329329
}));
330330

331331
it('should add extra classes to the container', () => {
332-
snackBar.open(simpleMessage, simpleActionLabel, {
333-
viewContainerRef: testViewContainerRef,
334-
extraClasses: ['one', 'two']
335-
});
332+
snackBar.open(simpleMessage, simpleActionLabel, { extraClasses: ['one', 'two'] });
333+
viewContainerFixture.detectChanges();
336334

337335
let containerClasses = overlayContainerElement.querySelector('snack-bar-container').classList;
338336

@@ -342,6 +340,7 @@ describe('MdSnackBar', () => {
342340

343341
it('should set the layout direction', () => {
344342
snackBar.open(simpleMessage, simpleActionLabel, { direction: 'rtl' });
343+
viewContainerFixture.detectChanges();
345344

346345
let pane = overlayContainerElement.querySelector('.cdk-overlay-pane');
347346

0 commit comments

Comments
 (0)