File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/plugins/dashboard/public Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { hashedItemStore } from '../../kibana_utils/public';
2222// eslint-disable-next-line
2323import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock' ;
2424import { esFilters } from '../../data/public' ;
25+ import { DashboardConstants } from './dashboard_constants' ;
2526
2627const APP_BASE_PATH : string = 'xyz/app/kibana' ;
2728
@@ -126,14 +127,18 @@ describe('dashboard url generator', () => {
126127 Promise . resolve ( { appBasePath : APP_BASE_PATH , useHashedUrl : false } )
127128 ) ;
128129 const url = await generator . createUrl ! ( { } ) ;
129- expect ( url ) . toEqual ( expect . stringContaining ( 'savedFiltersHandling=merge' ) ) ;
130+ expect ( url ) . toEqual (
131+ expect . stringContaining ( `${ DashboardConstants . SAVED_FILTERS_HANDLING_PARAM } =merge` )
132+ ) ;
130133 } ) ;
131134
132135 test ( 'can disable merging filters' , async ( ) => {
133136 const generator = createDirectAccessDashboardLinkGenerator ( ( ) =>
134137 Promise . resolve ( { appBasePath : APP_BASE_PATH , useHashedUrl : false } )
135138 ) ;
136139 const url = await generator . createUrl ! ( { savedFiltersHandling : 'override' } ) ;
137- expect ( url ) . not . toEqual ( expect . stringContaining ( 'savedFiltersHandling' ) ) ;
140+ expect ( url ) . not . toEqual (
141+ expect . stringContaining ( DashboardConstants . SAVED_FILTERS_HANDLING_PARAM )
142+ ) ;
138143 } ) ;
139144} ) ;
You can’t perform that action at this time.
0 commit comments