import { dataPluginMock } from '../../../../data/public/mocks' ; import { DashboardSavedObject } from '../../saved_dashboards' ; export function getSavedDashboardMock ( config ? ) { const searchSource = dataPluginMock . createStartContract ( ) ; return { id : '123' , title : 'my dashboard' , panelsJSON : '[]' , searchSource : searchSource . search . searchSource . create ( ) , copyOnSave : false , timeRestore : false , timeTo : 'now' , timeFrom : 'now-15m' , optionsJSON : '' , lastSavedTitle : '' , destroy : ( ) => { } , save : ( ) => { return Promise . resolve ( '123' ) ; } , getQuery : ( ) => ( { query : '' , language : 'kuery' } ) , getFilters : ( ) => [ ] , ... config , } as DashboardSavedObject ; }