diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts index f3e6eac011b73..308ec43593c0c 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts @@ -294,6 +294,13 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsResults.assertFeatureImportancePopoverContent(); }); + it('should display the feature importance decision path after changing page', async () => { + await ml.dataFrameAnalyticsResults.selectResultsTablePage(3); + await ml.dataFrameAnalyticsResults.assertResultsTableNotEmpty(); + await ml.dataFrameAnalyticsResults.openFeatureImportancePopover(); + await ml.dataFrameAnalyticsResults.assertFeatureImportancePopoverContent(); + }); + it('should display the histogram charts', async () => { await ml.testExecution.logTestStep( 'displays the histogram charts when option is enabled' diff --git a/x-pack/test/functional/services/ml/common_data_grid.ts b/x-pack/test/functional/services/ml/common_data_grid.ts index f118af7090b43..9950d6b8f7205 100644 --- a/x-pack/test/functional/services/ml/common_data_grid.ts +++ b/x-pack/test/functional/services/ml/common_data_grid.ts @@ -219,5 +219,20 @@ export function MachineLearningCommonDataGridProvider({ getService }: FtrProvide await browser.pressKeys(browser.keys.ESCAPE); }); }, + + async assertActivePage(tableSubj: string, expectedPage: number) { + const table = await testSubjects.find(tableSubj); + const pagination = await table.findByClassName('euiPagination__list'); + const activePage = await pagination.findByCssSelector( + '.euiPaginationButton[aria-current] .euiButtonEmpty__text' + ); + const text = await activePage.getVisibleText(); + expect(text).to.eql(expectedPage); + }, + + async selectPage(tableSubj: string, page: number) { + await testSubjects.click(`${tableSubj} > pagination-button-${page - 1}`); + await this.assertActivePage(tableSubj, page); + }, }; } diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts index a4378636673de..0fc99e1e032a1 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts @@ -57,6 +57,10 @@ export function MachineLearningDataFrameAnalyticsResultsProvider( await testSubjects.existOrFail('mlExplorationDataGrid loaded', { timeout: 5000 }); }, + async selectResultsTablePage(page: number) { + await commonDataGrid.selectPage('mlExplorationDataGrid loaded', page); + }, + async assertResultsTableTrainingFiltersExist() { await testSubjects.existOrFail('mlDFAnalyticsExplorationQueryBarFilterButtons', { timeout: 5000,