From cb40ad3843a233771b48070f68a65020a35c2361 Mon Sep 17 00:00:00 2001 From: Yngrid Coello Date: Wed, 27 Mar 2024 10:29:45 +0100 Subject: [PATCH] [Dataset quality] Awaiting table to be loaded before checking rows (#179440) Closes https://github.com/elastic/kibana/issues/179092 and https://github.com/elastic/kibana/issues/178652. Not awaiting for the loading state to be false produce some flakiness because the request could be slower some times, this PR adds the awaiting when getting table rows. [Flaky test runner (50 times)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5563) --- .../apps/dataset_quality/dataset_quality_table_filters.ts | 3 +-- x-pack/test/functional/page_objects/dataset_quality.ts | 5 +++++ .../dataset_quality/dataset_quality_table_filters.ts | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts index 0ed1162ccf9ee..eee4cefeb1017 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts @@ -20,8 +20,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const testSubjects = getService('testSubjects'); const to = '2024-01-01T12:00:00.000Z'; - // FLAKY: https://github.com/elastic/kibana/issues/179092 - describe.skip('Dataset quality table filters', () => { + describe('Dataset quality table filters', () => { before(async () => { await synthtrace.index(getInitialTestLogs({ to, count: 4 })); await PageObjects.datasetQuality.navigateTo(); diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index 2c917ba03ac12..ba1f2dbe296fc 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -104,6 +104,10 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv ); }, + async waitUntilTableLoaded() { + await find.waitForDeletedByCssSelector('.euiBasicTable-loading'); + }, + async waitUntilSummaryPanelLoaded() { await testSubjects.missingOrFail(`datasetQuality-${texts.activeDatasets}-loading`); await testSubjects.missingOrFail(`datasetQuality-${texts.estimatedData}-loading`); @@ -151,6 +155,7 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv }, async getDatasetTableRows(): Promise { + await this.waitUntilTableLoaded(); const table = await testSubjects.find(testSubjectSelectors.datasetQualityTable); const tBody = await table.findByTagName('tbody'); return tBody.findAllByTagName('tr'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts index 5ed86ab3c711a..220be569349b2 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts @@ -21,8 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const to = '2024-01-01T12:00:00.000Z'; - // FLAKY: https://github.com/elastic/kibana/issues/178652 - describe.skip('Dataset quality table filters', () => { + describe('Dataset quality table filters', () => { before(async () => { await synthtrace.index(getInitialTestLogs({ to, count: 4 })); await PageObjects.svlCommonPage.loginWithRole('admin');