@@ -1274,7 +1274,9 @@ describe('MDC-based MatDialog', () => {
1274
1274
document . body . appendChild ( button ) ;
1275
1275
button . focus ( ) ;
1276
1276
1277
- let dialogRef = dialog . open ( PizzaMsg , { viewContainerRef : testViewContainerRef } ) ;
1277
+ const dialogRef = TestBed . inject ( NgZone ) . run ( ( ) =>
1278
+ dialog . open ( PizzaMsg , { viewContainerRef : testViewContainerRef } ) ,
1279
+ ) ;
1278
1280
1279
1281
viewContainerFixture . detectChanges ( ) ;
1280
1282
flush ( ) ;
@@ -1531,10 +1533,12 @@ describe('MDC-based MatDialog', () => {
1531
1533
document . body . appendChild ( button ) ;
1532
1534
button . focus ( ) ;
1533
1535
1534
- const dialogRef = dialog . open ( PizzaMsg , {
1535
- viewContainerRef : testViewContainerRef ,
1536
- restoreFocus : false ,
1537
- } ) ;
1536
+ const dialogRef = TestBed . inject ( NgZone ) . run ( ( ) =>
1537
+ dialog . open ( PizzaMsg , {
1538
+ viewContainerRef : testViewContainerRef ,
1539
+ restoreFocus : false ,
1540
+ } ) ,
1541
+ ) ;
1538
1542
1539
1543
viewContainerFixture . detectChanges ( ) ;
1540
1544
flush ( ) ;
@@ -1567,7 +1571,9 @@ describe('MDC-based MatDialog', () => {
1567
1571
body . appendChild ( otherButton ) ;
1568
1572
button . focus ( ) ;
1569
1573
1570
- const dialogRef = dialog . open ( PizzaMsg , { viewContainerRef : testViewContainerRef } ) ;
1574
+ const dialogRef = TestBed . inject ( NgZone ) . run ( ( ) =>
1575
+ dialog . open ( PizzaMsg , { viewContainerRef : testViewContainerRef } ) ,
1576
+ ) ;
1571
1577
1572
1578
viewContainerFixture . detectChanges ( ) ;
1573
1579
flush ( ) ;
0 commit comments