@@ -140,6 +140,15 @@ describe('Overlay directives', () => {
140
140
141
141
const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
142
142
expect ( pane . style . width ) . toEqual ( '250px' ) ;
143
+
144
+ fixture . componentInstance . isOpen = false ;
145
+ fixture . detectChanges ( ) ;
146
+
147
+ fixture . componentInstance . width = 500 ;
148
+ fixture . componentInstance . isOpen = true ;
149
+ fixture . detectChanges ( ) ;
150
+
151
+ expect ( pane . style . width ) . toEqual ( '500px' ) ;
143
152
} ) ;
144
153
145
154
it ( 'should set the height' , ( ) => {
@@ -149,6 +158,15 @@ describe('Overlay directives', () => {
149
158
150
159
const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
151
160
expect ( pane . style . height ) . toEqual ( '100vh' ) ;
161
+
162
+ fixture . componentInstance . isOpen = false ;
163
+ fixture . detectChanges ( ) ;
164
+
165
+ fixture . componentInstance . height = '50vh' ;
166
+ fixture . componentInstance . isOpen = true ;
167
+ fixture . detectChanges ( ) ;
168
+
169
+ expect ( pane . style . height ) . toEqual ( '50vh' ) ;
152
170
} ) ;
153
171
154
172
it ( 'should set the min width' , ( ) => {
@@ -158,6 +176,15 @@ describe('Overlay directives', () => {
158
176
159
177
const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
160
178
expect ( pane . style . minWidth ) . toEqual ( '250px' ) ;
179
+
180
+ fixture . componentInstance . isOpen = false ;
181
+ fixture . detectChanges ( ) ;
182
+
183
+ fixture . componentInstance . minWidth = 500 ;
184
+ fixture . componentInstance . isOpen = true ;
185
+ fixture . detectChanges ( ) ;
186
+
187
+ expect ( pane . style . minWidth ) . toEqual ( '500px' ) ;
161
188
} ) ;
162
189
163
190
it ( 'should set the min height' , ( ) => {
@@ -167,6 +194,15 @@ describe('Overlay directives', () => {
167
194
168
195
const pane = overlayContainerElement . children [ 0 ] as HTMLElement ;
169
196
expect ( pane . style . minHeight ) . toEqual ( '500px' ) ;
197
+
198
+ fixture . componentInstance . isOpen = false ;
199
+ fixture . detectChanges ( ) ;
200
+
201
+ fixture . componentInstance . minHeight = '250px' ;
202
+ fixture . componentInstance . isOpen = true ;
203
+ fixture . detectChanges ( ) ;
204
+
205
+ expect ( pane . style . minHeight ) . toEqual ( '250px' ) ;
170
206
} ) ;
171
207
172
208
it ( 'should create the backdrop if designated' , ( ) => {
0 commit comments