From 3a67e1c52bad12e0c667972fe84e2ec11759b431 Mon Sep 17 00:00:00 2001 From: Yngrid Coello Date: Tue, 26 Mar 2024 15:27:24 +0100 Subject: [PATCH 1/2] Awaiting table to be loaded for checking rows --- .../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..644bbfde87ac6 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 testSubjects.missingOrFail('.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'); From de3e8f233962d344a33178c68df769c4984f96be Mon Sep 17 00:00:00 2001 From: Yngrid Coello Date: Tue, 26 Mar 2024 17:16:17 +0100 Subject: [PATCH 2/2] Using cssSelector instead of testSubject selector --- x-pack/test/functional/page_objects/dataset_quality.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index 644bbfde87ac6..ba1f2dbe296fc 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -105,7 +105,7 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv }, async waitUntilTableLoaded() { - await testSubjects.missingOrFail('.euiBasicTable-loading'); + await find.waitForDeletedByCssSelector('.euiBasicTable-loading'); }, async waitUntilSummaryPanelLoaded() {