@ -113,8 +113,19 @@ describe('ResponseTransformers', () => {
timepicker : {
refresh_intervals : [ '5s' , '10s' , '30s' ] ,
hidden : false ,
time_options : [ '5m' , '15m' , '1h' ] ,
nowDelay : '1m' ,
quick_ranges : [
{
display : 'Last 6 hours' ,
from : 'now-6h' ,
to : 'now' ,
} ,
{
display : 'Last 7 days' ,
from : 'now-7d' ,
to : 'now' ,
} ,
] ,
} ,
fiscalYearStartMonth : 1 ,
weekStart : 'monday' ,
@ -462,7 +473,7 @@ describe('ResponseTransformers', () => {
expect ( spec . timeSettings . autoRefresh ) . toBe ( dashboardV1 . refresh ) ;
expect ( spec . timeSettings . autoRefreshIntervals ) . toEqual ( dashboardV1 . timepicker ? . refresh_intervals ) ;
expect ( spec . timeSettings . hideTimepicker ) . toBe ( dashboardV1 . timepicker ? . hidden ) ;
expect ( spec . timeSettings . quickRanges ) . toEqual ( dashboardV1 . timepicker ? . time_option s) ;
expect ( spec . timeSettings . quickRanges ) . toEqual ( dashboardV1 . timepicker ? . quick_range s) ;
expect ( spec . timeSettings . nowDelay ) . toBe ( dashboardV1 . timepicker ? . nowDelay ) ;
expect ( spec . timeSettings . fiscalYearStartMonth ) . toBe ( dashboardV1 . fiscalYearStartMonth ) ;
expect ( spec . timeSettings . weekStart ) . toBe ( dashboardV1 . weekStart ) ;
@ -655,7 +666,18 @@ describe('ResponseTransformers', () => {
autoRefresh : '5m' ,
autoRefreshIntervals : [ '5s' , '10s' , '30s' ] ,
hideTimepicker : false ,
quickRanges : [ '5m' , '15m' , '1h' ] ,
quickRanges : [
{
display : 'Last 6 hours' ,
from : 'now-6h' ,
to : 'now' ,
} ,
{
display : 'Last 7 days' ,
from : 'now-7d' ,
to : 'now' ,
} ,
] ,
nowDelay : '1m' ,
fiscalYearStartMonth : 1 ,
weekStart : 'monday' ,
@ -730,7 +752,6 @@ describe('ResponseTransformers', () => {
expect ( dashboard . refresh ) . toBe ( dashboardV2 . spec . timeSettings . autoRefresh ) ;
expect ( dashboard . timepicker ? . refresh_intervals ) . toEqual ( dashboardV2 . spec . timeSettings . autoRefreshIntervals ) ;
expect ( dashboard . timepicker ? . hidden ) . toBe ( dashboardV2 . spec . timeSettings . hideTimepicker ) ;
expect ( dashboard . timepicker ? . time_options ) . toEqual ( dashboardV2 . spec . timeSettings . quickRanges ) ;
expect ( dashboard . timepicker ? . nowDelay ) . toBe ( dashboardV2 . spec . timeSettings . nowDelay ) ;
expect ( dashboard . fiscalYearStartMonth ) . toBe ( dashboardV2 . spec . timeSettings . fiscalYearStartMonth ) ;
expect ( dashboard . weekStart ) . toBe ( dashboardV2 . spec . timeSettings . weekStart ) ;