File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ describe('Datetime', () => {
6464 } ) ;
6565
6666 it ( 'persistent valid months going monthView->yearView->monthView' , ( ) => {
67- const dateBefore = new Date ( ) . getFullYear ( ) + ' -06-01',
68- component = utils . createDatetime ( { viewMode : 'months' , isValidDate : ( current ) =>
67+ const dateBefore = '2018 -06-01';
68+ const component = utils . createDatetime ( { viewMode : 'months' , isValidDate : ( current ) =>
6969 current . isBefore ( moment ( dateBefore , 'YYYY-MM-DD' ) )
7070 } ) ;
7171
@@ -78,9 +78,9 @@ describe('Datetime', () => {
7878 expect ( utils . isYearView ( component ) ) . toBeTruthy ( ) ;
7979
8080 expect ( utils . getNthYear ( component , 0 ) . hasClass ( 'rdtDisabled' ) ) . toEqual ( false ) ;
81- expect ( utils . getNthYear ( component , 9 ) . hasClass ( 'rdtDisabled' ) ) . toEqual ( true ) ;
81+ expect ( utils . getNthYear ( component , 10 ) . hasClass ( 'rdtDisabled' ) ) . toEqual ( true ) ;
8282
83- utils . clickNthYear ( component , 8 ) ;
83+ utils . clickNthYear ( component , 9 ) ;
8484 expect ( utils . getNthMonth ( component , 4 ) . hasClass ( 'rdtDisabled' ) ) . toEqual ( false ) ;
8585 expect ( utils . getNthMonth ( component , 5 ) . hasClass ( 'rdtDisabled' ) ) . toEqual ( true ) ;
8686 } ) ;
You can’t perform that action at this time.
0 commit comments