import expect from '@kbn/expect' ; import { FtrProviderContext } from '../../ftr_provider_context' ; export function MachineLearningDataFrameAnalyticsMapProvider ( { getService } ) { const testSubjects = getService ( 'testSubjects' ) ; return { async assertMapElementsExists ( ) { await testSubjects . existOrFail ( 'mlPageDataFrameAnalyticsMapTitle' ) ; await testSubjects . existOrFail ( 'mlPageDataFrameAnalyticsMapLegend' ) ; await testSubjects . existOrFail ( 'mlPageDataFrameAnalyticsMapCytoscape' ) ; } , async assertJobMapTitle ( id ) { const expected = `Map for analytics ID ${ id }` ; const actualTitle = await testSubjects . getVisibleText ( 'mlPageDataFrameAnalyticsMapTitle' ) ; expect ( actualTitle ) . to . eql ( expected , `Title for map should be '${ expected }' (got '${ actualTitle }')` ) ; } , } ; }