1
1
import { Component , ElementRef , NgZone , ViewChild , provideZoneChangeDetection } from '@angular/core' ;
2
- import { ComponentFixture , TestBed , inject } from '@angular/core/testing' ;
3
- import { Subject } from 'rxjs' ;
4
- import { Directionality } from '../bidi' ;
5
- import { ScrollDispatcher } from '../scrolling' ;
6
- import { Overlay } from './overlay' ;
7
- import { OverlayContainer } from './overlay-container' ;
2
+ import { ComponentFixture , TestBed } from '@angular/core/testing' ;
8
3
import { CdkConnectedOverlay , CdkOverlayOrigin } from './overlay-directives' ;
9
4
import { OverlayModule } from './overlay-module' ;
10
5
import {
@@ -15,25 +10,12 @@ import {
15
10
import { ScrollStrategy } from './scroll' ;
16
11
17
12
describe ( 'Overlay directives Zone.js integration' , ( ) => {
18
- let overlay : Overlay ;
19
- let overlayContainerElement : HTMLElement ;
20
13
let fixture : ComponentFixture < ConnectedOverlayDirectiveTest > ;
21
- let dir : { value : string } ;
22
- let scrolledSubject = new Subject ( ) ;
23
14
24
15
beforeEach ( ( ) => {
25
16
TestBed . configureTestingModule ( {
26
17
imports : [ OverlayModule , ConnectedOverlayDirectiveTest , ConnectedOverlayPropertyInitOrder ] ,
27
- providers : [
28
- provideZoneChangeDetection ( ) ,
29
- { provide : Directionality , useFactory : ( ) => ( dir = { value : 'ltr' } ) } ,
30
- {
31
- provide : ScrollDispatcher ,
32
- useFactory : ( ) => ( {
33
- scrolled : ( ) => scrolledSubject ,
34
- } ) ,
35
- } ,
36
- ] ,
18
+ providers : [ provideZoneChangeDetection ( ) ] ,
37
19
} ) ;
38
20
} ) ;
39
21
@@ -43,11 +25,6 @@ describe('Overlay directives Zone.js integration', () => {
43
25
fixture . detectChanges ( ) ;
44
26
} ) ;
45
27
46
- beforeEach ( inject ( [ OverlayContainer , Overlay ] , ( oc : OverlayContainer , o : Overlay ) => {
47
- overlay = o ;
48
- overlayContainerElement = oc . getContainerElement ( ) ;
49
- } ) ) ;
50
-
51
28
describe ( 'outputs' , ( ) => {
52
29
it ( 'should emit the position change handler inside the zone' , ( ) => {
53
30
let callsInZone : boolean [ ] = [ ] ;
0 commit comments