From 13a5cf437d1c6ecdebfa9acff390a350aadc12ff Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Tue, 13 Apr 2021 12:26:20 +0300 Subject: [PATCH] [Datatable] Fix filter cell flakiness --- test/functional/apps/visualize/_data_table.ts | 18 ++++++++---------- .../page_objects/visualize_chart_page.ts | 5 +++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/test/functional/apps/visualize/_data_table.ts b/test/functional/apps/visualize/_data_table.ts index 96cbf97621b08..1ff5bdcc6da78 100644 --- a/test/functional/apps/visualize/_data_table.ts +++ b/test/functional/apps/visualize/_data_table.ts @@ -267,16 +267,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should apply correct filter', async () => { - await retry.try(async () => { - await PageObjects.visChart.filterOnTableCell(1, 3); - await PageObjects.visChart.waitForVisualizationRenderingStabilized(); - const data = await PageObjects.visChart.getTableVisContent(); - expect(data).to.be.eql([ - ['png', '1,373'], - ['gif', '918'], - ['Other', '445'], - ]); - }); + await PageObjects.visChart.filterOnTableCell(1, 3); + await PageObjects.visChart.waitForVisualizationRenderingStabilized(); + const data = await PageObjects.visChart.getTableVisContent(); + expect(data).to.be.eql([ + ['png', '1,373'], + ['gif', '918'], + ['Other', '445'], + ]); }); }); diff --git a/test/functional/page_objects/visualize_chart_page.ts b/test/functional/page_objects/visualize_chart_page.ts index cd1c5cf318e63..7b69101b92475 100644 --- a/test/functional/page_objects/visualize_chart_page.ts +++ b/test/functional/page_objects/visualize_chart_page.ts @@ -419,12 +419,13 @@ export function VisualizeChartPageProvider({ getService, getPageObjects }: FtrPr public async filterOnTableCell(columnIndex: number, rowIndex: number) { await retry.try(async () => { const cell = await dataGrid.getCellElement(rowIndex, columnIndex); - await cell.focus(); + await cell.click(); const filterBtn = await testSubjects.findDescendant( 'tbvChartCell__filterForCellValue', cell ); - await filterBtn.click(); + await common.sleep(2000); + filterBtn.click(); }); }