@@ -1678,8 +1678,8 @@ describe('igxOverlay', () => {
16781678 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
16791679 const wrapperContent = wrappers [ wrappers . length - 1 ] . lastElementChild ; // wrapped in NG-COMPONENT
16801680 expect ( wrapperContent . children . length ) . toEqual ( 1 ) ;
1681- expect ( wrapperContent . lastElementChild . getAttribute ( 'style' ) )
1682- . toEqual ( 'width:100px; height: 100px; background-color: red' ) ;
1681+ expect ( wrapperContent . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g , ':' ) . replace ( / r e d ; / , 'red' ) )
1682+ . toEqual ( 'width:100px; height:100px; background-color:red' ) ;
16831683 } ) ) ;
16841684
16851685 it ( 'Should show the component inside of the viewport if it would normally be outside of bounds, BOTTOM + RIGHT.' , fakeAsync ( ( ) => {
@@ -1702,8 +1702,9 @@ describe('igxOverlay', () => {
17021702 fix . detectChanges ( ) ;
17031703 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
17041704 const wrapperContent = wrappers [ wrappers . length - 1 ] as HTMLElement ; // wrapped in NG-COMPONENT
1705- const expectedStyle = 'width:100px; height: 100px; background-color: red' ;
1706- expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) ) . toEqual ( expectedStyle ) ;
1705+ const expectedStyle = 'width:100px; height:100px; background-color:red' ;
1706+ expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g, ':' ) . replace ( / r e d ; / , 'red' ) )
1707+ . toEqual ( expectedStyle ) ;
17071708 const buttonLeft = buttonElement . offsetLeft ;
17081709 const buttonTop = buttonElement . offsetTop ;
17091710 const expectedLeft = buttonLeft - wrapperContent . lastElementChild . lastElementChild . clientWidth ;
@@ -2131,8 +2132,8 @@ describe('igxOverlay', () => {
21312132 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
21322133 const wrapperContent = wrappers [ wrappers . length - 1 ] . lastElementChild ; // wrapped in NG-COMPONENT
21332134 expect ( wrapperContent . children . length ) . toEqual ( 1 ) ;
2134- expect ( wrapperContent . lastElementChild . getAttribute ( 'style' ) )
2135- . toEqual ( 'width:100px; height: 100px; background-color: red' ) ;
2135+ expect ( wrapperContent . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g , ':' ) . replace ( / r e d ; / , 'red' ) )
2136+ . toEqual ( 'width:100px; height:100px; background-color:red' ) ;
21362137 } ) ) ;
21372138
21382139 it ( 'Should show the component inside of the viewport if it would normally be outside of bounds, BOTTOM + RIGHT.' , fakeAsync ( ( ) => {
@@ -2910,8 +2911,9 @@ describe('igxOverlay', () => {
29102911 fix . detectChanges ( ) ;
29112912 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
29122913 const wrapperContent = wrappers [ wrappers . length - 1 ] as HTMLElement ;
2913- const expectedStyle = 'width:100px; height: 100px; background-color: red' ;
2914- expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) ) . toEqual ( expectedStyle ) ;
2914+ const expectedStyle = 'width:100px; height:100px; background-color:red' ;
2915+ expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g, ':' ) . replace ( / r e d ; / , 'red' ) )
2916+ . toEqual ( expectedStyle ) ;
29152917 const buttonLeft = buttonElement . offsetLeft ;
29162918 const buttonTop = buttonElement . offsetTop ;
29172919 const expectedLeft = buttonLeft + buttonElement . clientWidth ; // To the right of the button
@@ -2960,8 +2962,9 @@ describe('igxOverlay', () => {
29602962 fix . detectChanges ( ) ;
29612963 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
29622964 const wrapperContent = wrappers [ wrappers . length - 1 ] as HTMLElement ;
2963- const expectedStyle = 'width:100px; height: 100px; background-color: red' ;
2964- expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) ) . toEqual ( expectedStyle ) ;
2965+ const expectedStyle = 'width:100px; height:100px; background-color:red' ;
2966+ expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g, ':' ) . replace ( / r e d ; / , 'red' ) )
2967+ . toEqual ( expectedStyle ) ;
29652968 const buttonLeft = buttonElement . offsetLeft ;
29662969 const buttonTop = buttonElement . offsetTop ;
29672970 const expectedRight = buttonLeft ; // To the left of the button
@@ -3009,8 +3012,9 @@ describe('igxOverlay', () => {
30093012 fix . detectChanges ( ) ;
30103013 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
30113014 const contentElement = wrappers [ wrappers . length - 1 ] as HTMLElement ; // wrapper in NG-COMPONENT
3012- const expectedStyle = 'width:100px; height: 100px; background-color: red' ;
3013- expect ( contentElement . lastElementChild . lastElementChild . getAttribute ( 'style' ) ) . toEqual ( expectedStyle ) ;
3015+ const expectedStyle = 'width:100px; height:100px; background-color:red' ;
3016+ expect ( contentElement . lastElementChild . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g, ':' ) . replace ( / r e d ; / , 'red' ) )
3017+ . toEqual ( expectedStyle ) ;
30143018 const expectedRight = buttonElement . offsetLeft ;
30153019 const expectedTop = buttonElement . offsetTop + buttonElement . clientHeight ;
30163020 const contentElementRect = contentElement . getBoundingClientRect ( ) ;
@@ -3058,8 +3062,9 @@ describe('igxOverlay', () => {
30583062 fix . detectChanges ( ) ;
30593063 const wrappers = document . getElementsByClassName ( CLASS_OVERLAY_CONTENT ) ;
30603064 const wrapperContent = wrappers [ wrappers . length - 1 ] as HTMLElement ;
3061- const expectedStyle = 'width:100px; height: 100px; background-color: red' ;
3062- expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) ) . toEqual ( expectedStyle ) ;
3065+ const expectedStyle = 'width:100px; height:100px; background-color:red' ;
3066+ expect ( wrapperContent . lastElementChild . lastElementChild . getAttribute ( 'style' ) . replace ( / : \s / g, ':' ) . replace ( / r e d ; / , 'red' ) )
3067+ . toEqual ( expectedStyle ) ;
30633068 const buttonLeft = buttonElement . offsetLeft ;
30643069 const buttonTop = buttonElement . offsetTop ;
30653070 const expectedLeft = buttonLeft + buttonElement . clientWidth ; // To the right of the button
0 commit comments