Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datatable] Fix filter cell flakiness #96934

Merged
merged 1 commit into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions test/functional/apps/visualize/_data_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
]);
});
});

Expand Down
5 changes: 3 additions & 2 deletions test/functional/page_objects/visualize_chart_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down