@@ -165,7 +165,7 @@ describe('Overlay', () => {
165165
166166 overlayRef . attach ( componentPortal ) ;
167167
168- expect ( overlayRef . hostElement . getAttribute ( 'dir' ) ) . toEqual ( 'rtl' ) ;
168+ expect ( overlayRef . hostElement . getAttribute ( 'dir' ) ) . toBe ( 'rtl' ) ;
169169 } ) ;
170170
171171 it ( 'should emit when an overlay is attached' , ( ) => {
@@ -375,7 +375,7 @@ describe('Overlay', () => {
375375 const overlayRef = overlay . create ( config ) ;
376376
377377 overlayRef . attach ( componentPortal ) ;
378- expect ( overlayRef . overlayElement . style . width ) . toEqual ( '500px' ) ;
378+ expect ( overlayRef . overlayElement . style . width ) . toBe ( '500px' ) ;
379379 } ) ;
380380
381381 it ( 'should support using other units if a string width is provided' , ( ) => {
@@ -384,7 +384,7 @@ describe('Overlay', () => {
384384 const overlayRef = overlay . create ( config ) ;
385385
386386 overlayRef . attach ( componentPortal ) ;
387- expect ( overlayRef . overlayElement . style . width ) . toEqual ( '200%' ) ;
387+ expect ( overlayRef . overlayElement . style . width ) . toBe ( '200%' ) ;
388388 } ) ;
389389
390390 it ( 'should apply the height set in the config' , ( ) => {
@@ -393,7 +393,7 @@ describe('Overlay', () => {
393393 const overlayRef = overlay . create ( config ) ;
394394
395395 overlayRef . attach ( componentPortal ) ;
396- expect ( overlayRef . overlayElement . style . height ) . toEqual ( '500px' ) ;
396+ expect ( overlayRef . overlayElement . style . height ) . toBe ( '500px' ) ;
397397 } ) ;
398398
399399 it ( 'should support using other units if a string height is provided' , ( ) => {
@@ -402,7 +402,7 @@ describe('Overlay', () => {
402402 const overlayRef = overlay . create ( config ) ;
403403
404404 overlayRef . attach ( componentPortal ) ;
405- expect ( overlayRef . overlayElement . style . height ) . toEqual ( '100vh' ) ;
405+ expect ( overlayRef . overlayElement . style . height ) . toBe ( '100vh' ) ;
406406 } ) ;
407407
408408 it ( 'should apply the min width set in the config' , ( ) => {
@@ -411,17 +411,16 @@ describe('Overlay', () => {
411411 const overlayRef = overlay . create ( config ) ;
412412
413413 overlayRef . attach ( componentPortal ) ;
414- expect ( overlayRef . overlayElement . style . minWidth ) . toEqual ( '200px' ) ;
414+ expect ( overlayRef . overlayElement . style . minWidth ) . toBe ( '200px' ) ;
415415 } ) ;
416416
417-
418417 it ( 'should apply the min height set in the config' , ( ) => {
419418 config . minHeight = 500 ;
420419
421420 const overlayRef = overlay . create ( config ) ;
422421
423422 overlayRef . attach ( componentPortal ) ;
424- expect ( overlayRef . overlayElement . style . minHeight ) . toEqual ( '500px' ) ;
423+ expect ( overlayRef . overlayElement . style . minHeight ) . toBe ( '500px' ) ;
425424 } ) ;
426425
427426 it ( 'should apply the max width set in the config' , ( ) => {
@@ -430,7 +429,7 @@ describe('Overlay', () => {
430429 const overlayRef = overlay . create ( config ) ;
431430
432431 overlayRef . attach ( componentPortal ) ;
433- expect ( overlayRef . overlayElement . style . maxWidth ) . toEqual ( '200px' ) ;
432+ expect ( overlayRef . overlayElement . style . maxWidth ) . toBe ( '200px' ) ;
434433 } ) ;
435434
436435
@@ -440,7 +439,7 @@ describe('Overlay', () => {
440439 const overlayRef = overlay . create ( config ) ;
441440
442441 overlayRef . attach ( componentPortal ) ;
443- expect ( overlayRef . overlayElement . style . maxHeight ) . toEqual ( '500px' ) ;
442+ expect ( overlayRef . overlayElement . style . maxHeight ) . toBe ( '500px' ) ;
444443 } ) ;
445444
446445 it ( 'should support zero widths and heights' , ( ) => {
@@ -450,9 +449,45 @@ describe('Overlay', () => {
450449 const overlayRef = overlay . create ( config ) ;
451450
452451 overlayRef . attach ( componentPortal ) ;
453- expect ( overlayRef . overlayElement . style . width ) . toEqual ( '0px' ) ;
454- expect ( overlayRef . overlayElement . style . height ) . toEqual ( '0px' ) ;
452+ expect ( overlayRef . overlayElement . style . width ) . toBe ( '0px' ) ;
453+ expect ( overlayRef . overlayElement . style . height ) . toBe ( '0px' ) ;
455454 } ) ;
455+
456+ it ( 'should be able to reset the various size properties' , ( ) => {
457+ config . minWidth = config . minHeight = 100 ;
458+ config . width = config . height = 200 ;
459+ config . maxWidth = config . maxHeight = 300 ;
460+
461+ const overlayRef = overlay . create ( config ) ;
462+ overlayRef . attach ( componentPortal ) ;
463+ const style = overlayRef . overlayElement . style ;
464+
465+ expect ( style . minWidth ) . toBe ( '100px' ) ;
466+ expect ( style . minHeight ) . toBe ( '100px' ) ;
467+ expect ( style . width ) . toBe ( '200px' ) ;
468+ expect ( style . height ) . toBe ( '200px' ) ;
469+ expect ( style . maxWidth ) . toBe ( '300px' ) ;
470+ expect ( style . maxHeight ) . toBe ( '300px' ) ;
471+
472+ overlayRef . updateSize ( {
473+ minWidth : '' ,
474+ minHeight : '' ,
475+ width : '' ,
476+ height : '' ,
477+ maxWidth : '' ,
478+ maxHeight : ''
479+ } ) ;
480+
481+ overlayRef . updatePosition ( ) ;
482+
483+ expect ( style . minWidth ) . toBeFalsy ( ) ;
484+ expect ( style . minHeight ) . toBeFalsy ( ) ;
485+ expect ( style . width ) . toBeFalsy ( ) ;
486+ expect ( style . height ) . toBeFalsy ( ) ;
487+ expect ( style . maxWidth ) . toBeFalsy ( ) ;
488+ expect ( style . maxHeight ) . toBeFalsy ( ) ;
489+ } ) ;
490+
456491 } ) ;
457492
458493 describe ( 'backdrop' , ( ) => {
0 commit comments