import expect from '@kbn/expect' ; import { FtrProviderContext } from '../../../../ftr_provider_context' ; export default function enterpriseSearchSetupGuideTests ( { getService , getPageObjects , } ) { const esArchiver = getService ( 'esArchiver' ) ; const browser = getService ( 'browser' ) ; const retry = getService ( 'retry' ) ; const PageObjects = getPageObjects ( [ 'workplaceSearch' ] ) ; describe ( 'Setup Guide' , function ( ) { before ( async ( ) => await esArchiver . load ( 'x-pack/test/functional/es_archives/empty_kibana' ) ) ; after ( async ( ) => { await esArchiver . unload ( 'x-pack/test/functional/es_archives/empty_kibana' ) ; } ) ; describe ( 'when no enterpriseSearch.host is configured' , ( ) => { it ( 'navigating to the plugin will redirect a user to the setup guide' , async ( ) => { await PageObjects . workplaceSearch . navigateToPage ( ) ; await retry . try ( async function ( ) { const currentUrl = await browser . getCurrentUrl ( ) ; expect ( currentUrl ) . to . contain ( '/workplace_search/setup_guide' ) ; const documentTitle = await browser . getTitle ( ) ; expect ( documentTitle ) . to . contain ( 'Setup Guide - Workplace Search - Elastic' ) ; } ) ; } ) ; } ) ; } ) ; }