@@ -85,6 +85,24 @@ describe('Overlay directives', () => {
8585 expect ( pane . style . height ) . toEqual ( '100vh' ) ;
8686 } ) ;
8787
88+ it ( 'should set the min width' , ( ) => {
89+ fixture . componentInstance . minWidth = 250 ;
90+ fixture . componentInstance . isOpen = true ;
91+ fixture . detectChanges ( ) ;
92+
93+ const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
94+ expect ( pane . style . minWidth ) . toEqual ( '250px' ) ;
95+ } ) ;
96+
97+ it ( 'should set the min height' , ( ) => {
98+ fixture . componentInstance . minHeight = '500px' ;
99+ fixture . componentInstance . isOpen = true ;
100+ fixture . detectChanges ( ) ;
101+
102+ const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
103+ expect ( pane . style . minHeight ) . toEqual ( '500px' ) ;
104+ } ) ;
105+
88106 it ( 'should create the backdrop if designated' , ( ) => {
89107 fixture . componentInstance . hasBackdrop = true ;
90108 fixture . componentInstance . isOpen = true ;
@@ -219,14 +237,16 @@ describe('Overlay directives', () => {
219237 [hasBackdrop]="hasBackdrop" backdropClass="md-test-class"
220238 (backdropClick)="backdropClicked=true" [offsetX]="offsetX" [offsetY]="offsetY"
221239 (positionChange)="positionChangeHandler($event)" (attach)="attachHandler()"
222- (detach)="detachHandler()">
240+ (detach)="detachHandler()" [minWidth]="minWidth" [minHeight]="minHeight" >
223241 <p>Menu content</p>
224242 </template>` ,
225243} )
226244class ConnectedOverlayDirectiveTest {
227245 isOpen = false ;
228246 width : number | string ;
229247 height : number | string ;
248+ minWidth : number | string ;
249+ minHeight : number | string ;
230250 offsetX : number = 0 ;
231251 offsetY : number = 0 ;
232252 hasBackdrop : boolean ;
0 commit comments