import expect from '@kbn/expect' ; import { FtrProviderContext } from '../../../ftr_provider_context' ; export default function ( { getPageObjects , getService } ) { const esArchiver = getService ( 'esArchiver' ) ; const searchSession = getService ( 'searchSessions' ) ; const PageObjects = getPageObjects ( [ 'visualize' , 'lens' , 'common' , 'timePicker' , 'header' ] ) ; const listingTable = getService ( 'listingTable' ) ; const kibanaServer = getService ( 'kibanaServer' ) ; describe ( 'lens search sessions' , ( ) => { before ( async ( ) => { await esArchiver . loadIfNeeded ( 'x-pack/test/functional/es_archives/logstash_functional' ) ; await kibanaServer . importExport . load ( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ) ; } ) ; after ( async ( ) => { await kibanaServer . importExport . unload ( 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json' ) ; } ) ; it ( "doesn't shows search sessions indicator UI" , async ( ) => { await PageObjects . visualize . gotoVisualizationLandingPage ( ) ; await listingTable . searchForItemWithName ( 'lnsXYvis' ) ; await PageObjects . lens . clickVisualizeListItemTitle ( 'lnsXYvis' ) ; await PageObjects . lens . goToTimeRange ( ) ; await PageObjects . header . waitUntilLoadingHasFinished ( ) ; expect ( await PageObjects . lens . isShowingNoResults ( ) ) . to . be ( false ) ; await searchSession . missingOrFail ( ) ; } ) ; } ) ; }