@@ -919,29 +919,35 @@ describe('Datetime', () => {
919919 it ( 'displayTimeZone -> value should change format (undefined->America/New_York)' , ( ) => {
920920 const date = new Date ( 2000 , 0 , 15 , 2 , 2 , 2 , 2 ) ,
921921 momentDate = moment ( date ) ,
922- component = utils . createDatetime ( { value : momentDate } ) ,
922+ component = utils . createDatetime ( { initialViewMode : 'time' , timeFormat : 'HH' , value : momentDate } ) ,
923923 displayTimeZone = ( moment . tz . guess ( ) === 'America/New_York' ? 'America/Los_Angeles' : 'America/New_York' ) ;
924924
925925 const valueBefore = utils . getInputValue ( component ) ;
926+ const timeCountBefore = component . find ( '.rdtCount' ) . text ( ) ;
926927 component . setProps ( { displayTimeZone : displayTimeZone } , ( ) => {
927928 const valueAfter = utils . getInputValue ( component ) ;
928929
929930 expect ( valueBefore ) . not . toEqual ( valueAfter ) ;
930931 } ) ;
932+ const timeCountAfter = component . find ( '.rdtCount' ) . text ( ) ;
933+ expect ( timeCountBefore ) . not . toEqual ( timeCountAfter ) ;
931934 } ) ;
932935
933936 it ( 'displayTimeZone -> value should change format (America/New_York->undefined)' , ( ) => {
934937 const date = new Date ( 2000 , 0 , 15 , 2 , 2 , 2 , 2 ) ,
935938 momentDate = moment ( date ) ,
936939 displayTimeZone = ( moment . tz . guess ( ) === 'America/New_York' ? 'America/Los_Angeles' : 'America/New_York' ) ,
937- component = utils . createDatetime ( { value : momentDate , displayTimeZone : displayTimeZone } ) ;
940+ component = utils . createDatetime ( { initialViewMode : 'time' , timeFormat : 'HH' , value : momentDate , displayTimeZone : displayTimeZone } ) ;
938941
939942 const valueBefore = utils . getInputValue ( component ) ;
943+ const timeCountBefore = component . find ( '.rdtCount' ) . text ( ) ;
940944 component . setProps ( { displayTimeZone : undefined } , ( ) => {
941945 const valueAfter = utils . getInputValue ( component ) ;
942946
943947 expect ( valueBefore ) . not . toEqual ( valueAfter ) ;
944948 } ) ;
949+ const timeCountAfter = component . find ( '.rdtCount' ) . text ( ) ;
950+ expect ( timeCountBefore ) . not . toEqual ( timeCountAfter ) ;
945951 } ) ;
946952
947953 it ( 'locale -> picker should change language (initialViewMode=days)' , ( ) => {
0 commit comments