@@ -705,71 +705,6 @@ describe('AppComponent', () => {
705
705
} ) ;
706
706
} ) ) ;
707
707
708
- it ( 'should assign help config extends key to the svcid if one exists' , async ( ( ) => {
709
- const spyHelp = spyOn ( mockHelpInitService , 'load' ) ;
710
- const expectedCall = { productId : 'test-config' , extends : 'help-extend' } ;
711
- skyAppConfig . skyux . help = { productId : 'test-config' } ;
712
-
713
- skyAppConfig . skyux . params = [ 'svcid' ] ;
714
- skyAppConfig . runtime . params . has = ( key : any ) => key === 'svcid' ;
715
- skyAppConfig . runtime . params . get = ( key : any ) => key === 'svcid' ? 'help-extend' : false ;
716
-
717
- setup ( skyAppConfig ) . then ( ( ) => {
718
- fixture . detectChanges ( ) ;
719
- expect ( spyHelp ) . not . toHaveBeenCalledWith ( skyAppConfig . skyux . help ) ;
720
- expect ( spyHelp ) . toHaveBeenCalledWith ( expectedCall ) ;
721
- } ) ;
722
- } ) ) ;
723
-
724
- it ( 'should assign help config locale key if none exist and host exposes the browser language' , async ( ( ) => {
725
- const spyHelp = spyOn ( mockHelpInitService , 'load' ) ;
726
-
727
- skyAppConfig . runtime . params . has = ( key : any ) => key === false ;
728
-
729
- mockSkyuxHost = {
730
- acceptLanguage : 'fr-ca'
731
- } ;
732
- const expectedCall = { productId : 'test-config' , extends : 'bb-help' , locale : mockSkyuxHost . acceptLanguage } ;
733
- skyAppConfig . skyux . help = { productId : 'test-config' , extends : 'bb-help' } ;
734
-
735
- setup ( skyAppConfig ) . then ( ( ) => {
736
- fixture . detectChanges ( ) ;
737
- expect ( spyHelp ) . not . toHaveBeenCalledWith ( skyAppConfig . skyux . help ) ;
738
- expect ( spyHelp ) . toHaveBeenCalledWith ( expectedCall ) ;
739
- } ) ;
740
- } ) ) ;
741
-
742
- it ( 'should fallback to \'\' for the locale if SKYUX_HOST.acceptLanguage does not exist' , async ( ( ) => {
743
- const spyHelp = spyOn ( mockHelpInitService , 'load' ) ;
744
-
745
- skyAppConfig . runtime . params . has = ( key : any ) => key === false ;
746
-
747
- mockSkyuxHost = { } ;
748
- const expectedCall = { productId : 'test-config' , extends : 'bb-help' , locale : '' } ;
749
- skyAppConfig . skyux . help = { productId : 'test-config' , extends : 'bb-help' } ;
750
-
751
- setup ( skyAppConfig ) . then ( ( ) => {
752
- fixture . detectChanges ( ) ;
753
- expect ( spyHelp ) . not . toHaveBeenCalledWith ( skyAppConfig . skyux . help ) ;
754
- expect ( spyHelp ) . toHaveBeenCalledWith ( expectedCall ) ;
755
- } ) ;
756
- } ) ) ;
757
-
758
- it ( 'should not override a locale that has been passed into the config' , async ( ( ) => {
759
- const spyHelp = spyOn ( mockHelpInitService , 'load' ) ;
760
- mockSkyuxHost = {
761
- acceptLanguage : 'fr-ca'
762
- } ;
763
- const expectedCall = { productId : 'test-config' , extends : 'bb-help' , locale : 'en-ga' } ;
764
- skyAppConfig . skyux . help = { productId : 'test-config' , extends : 'bb-help' , locale : 'en-ga' } ;
765
-
766
- setup ( skyAppConfig ) . then ( ( ) => {
767
- fixture . detectChanges ( ) ;
768
- expect ( spyHelp ) . toHaveBeenCalledWith ( skyAppConfig . skyux . help ) ;
769
- expect ( spyHelp ) . toHaveBeenCalledWith ( expectedCall ) ;
770
- } ) ;
771
- } ) ) ;
772
-
773
708
it ( 'should set isReady after SkyAppStyleLoader.loadStyles is resolved' , async ( ( ) => {
774
709
setup ( skyAppConfig ) . then ( ( ) => {
775
710
expect ( comp . isReady ) . toEqual ( true ) ;
0 commit comments