Skip to content

Commit

Permalink
fix Lens table test
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Feb 5, 2021
1 parent a4cd42b commit 15d95fc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions x-pack/test/functional/apps/lens/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']);
const listingTable = getService('listingTable');
const find = getService('find');
const retry = getService('retry');

describe('lens datatable', () => {
it('should able to sort a table by a column', async () => {
Expand Down Expand Up @@ -40,13 +41,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('should able to use filters cell actions in table', async () => {
const firstCellContent = await PageObjects.lens.getDatatableCellText(0, 0);
await PageObjects.lens.clickTableCellAction(0, 0, 'lensDatatableFilterOut');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(
await find.existsByCssSelector(
`[data-test-subj*="filter-value-${firstCellContent}"][data-test-subj*="filter-negated"]`
)
).to.eql(true);
await retry.try(async () => {
await PageObjects.lens.clickTableCellAction(0, 0, 'lensDatatableFilterOut');
await PageObjects.header.waitUntilLoadingHasFinished();
expect(
await find.existsByCssSelector(
`[data-test-subj*="filter-value-${firstCellContent}"][data-test-subj*="filter-negated"]`
)
).to.eql(true);
});
});

it('should allow to configure column visibility', async () => {
Expand Down

0 comments on commit 15d95fc

Please sign in to comment.