@@ -799,7 +799,7 @@ describe('NgHttpLoaderComponent', () => {
799799 expect ( element . style . opacity ) . toBe ( `0${ component . opacity } ` ) ;
800800 } ) ;
801801
802- it ( 'should have a default backdrop background color' , ( ) => {
802+ it ( 'should have a default backdrop background color if backdrop is true ' , ( ) => {
803803 component . isVisible$ = of ( true ) ;
804804 fixture . detectChanges ( ) ;
805805
@@ -811,7 +811,7 @@ describe('NgHttpLoaderComponent', () => {
811811 expect ( element . style . backgroundColor ) . toBe ( 'rgb(241, 241, 241)' ) ;
812812 } ) ;
813813
814- it ( 'should be possible to override backdrop background color' , ( ) => {
814+ it ( 'should be possible to override backdrop background color when backdrop is true ' , ( ) => {
815815 component . isVisible$ = of ( true ) ;
816816 component . backdropBackgroundColor = '#777777' ;
817817 fixture . detectChanges ( ) ;
@@ -823,4 +823,17 @@ describe('NgHttpLoaderComponent', () => {
823823
824824 expect ( element . style . backgroundColor ) . toBe ( 'rgb(119, 119, 119)' ) ;
825825 } ) ;
826+
827+ it ( 'should not have a transparent backdrop background color if backdrop is false' , ( ) => {
828+ component . isVisible$ = of ( true ) ;
829+ component . backdrop = false ;
830+ fixture . detectChanges ( ) ;
831+
832+ const element : HTMLElement = fixture
833+ . debugElement
834+ . query ( By . css ( '#spinner' ) )
835+ . nativeElement ;
836+
837+ expect ( element . style . backgroundColor ) . toBe ( 'transparent' ) ;
838+ } ) ;
826839} ) ;
0 commit comments