@@ -948,6 +948,68 @@ describe( 'Notifier Notification Component', () => {
948948
949949 } ) ) ;
950950
951+ it ( 'should extract autoHide values from key' , fakeAsync ( ( ) => {
952+
953+ // Setup test module
954+ beforeEachWithConfig ( new NotifierConfig ( {
955+ animations : {
956+ enabled : false
957+ } ,
958+ behaviour : {
959+ autoHide : { [ testNotification . type ] : 787 , default : 989 }
960+ onMouseover : 'pauseAutoHide'
961+ }
962+ } ) ) ;
963+
964+ componentInstance . notification = testNotification ;
965+ componentFixture . detectChanges ( ) ;
966+ jest . spyOn ( timerService , 'start' ) ;
967+ componentInstance . show ( { type : 'info' , message : 'test' } ) ;
968+
969+ expect ( timerService . start ) . toHaveBeenCalledWith ( 787 ) ;
970+ } ) ) ;
971+
972+ it ( 'should extract autoHide values from default' , fakeAsync ( ( ) => {
973+
974+ // Setup test module
975+ beforeEachWithConfig ( new NotifierConfig ( {
976+ animations : {
977+ enabled : false
978+ } ,
979+ behaviour : {
980+ autoHide : { default : 989 }
981+ onMouseover : 'pauseAutoHide'
982+ }
983+ } ) ) ;
984+
985+ componentInstance . notification = testNotification ;
986+ componentFixture . detectChanges ( ) ;
987+ jest . spyOn ( timerService , 'start' ) ;
988+ componentInstance . show ( { type : 'info' , message : 'test' } ) ;
989+
990+ expect ( timerService . start ) . toHaveBeenCalledWith ( 989 ) ;
991+ } ) ) ;
992+
993+ it ( 'should extract autoHide values from fallback' , fakeAsync ( ( ) => {
994+
995+ // Setup test module
996+ beforeEachWithConfig ( new NotifierConfig ( {
997+ animations : {
998+ enabled : false
999+ } ,
1000+ behaviour : {
1001+ autoHide : { }
1002+ onMouseover : 'pauseAutoHide'
1003+ }
1004+ } ) ) ;
1005+
1006+ componentInstance . notification = testNotification ;
1007+ componentFixture . detectChanges ( ) ;
1008+ jest . spyOn ( timerService , 'start' ) ;
1009+ componentInstance . show ( { type : 'info' , message : 'test' } ) ;
1010+
1011+ expect ( timerService . start ) . not . toHaveBeenCalled ( ) ;
1012+ } ) ) ;
9511013 } ) ;
9521014
9531015 /**
0 commit comments