From 8b44bc2560673fe2ecc6f2c62774dbe7efeaa82b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:54:36 +1100 Subject: [PATCH] [8.x] [Dataset Quality] Fix tests for degraded fields flyout (#202288) (#202432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.x`: - [[Dataset Quality] Fix tests for degraded fields flyout (#202288)](https://github.com/elastic/kibana/pull/202288) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Marco Antonio Ghiani --- .../dataset_quality/degraded_field_flyout.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts index 9fb1f74cbae0e..eebf6bcb90373 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts @@ -22,6 +22,7 @@ import { logsNginxMappings } from './custom_mappings/custom_integration_mappings export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects([ 'common', + 'header', 'navigationalSearch', 'observabilityLogsExplorer', 'datasetQuality', @@ -452,6 +453,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'test_field', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const fieldIgnoredMessageExists = await PageObjects.datasetQuality.doesTextExist( 'datasetQualityDetailsDegradedFieldFlyoutFieldValue-cause', @@ -469,6 +472,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'test_field', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const testFieldValue1Exists = await PageObjects.datasetQuality.doesTextExist( 'datasetQualityDetailsDegradedFieldFlyoutFieldValue-values', @@ -491,6 +496,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'test_field', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const limitValueExists = await PageObjects.datasetQuality.doesTextExist( 'datasetQualityDetailsDegradedFieldFlyoutFieldValue-characterLimit', @@ -508,6 +515,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'test_field', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + // Possible Mitigation Section should exist await testSubjects.existOrFail( 'datasetQualityDetailsDegradedFieldFlyoutPossibleMitigationTitle' @@ -567,6 +576,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'test_field', }); + await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.datasetQuality.waitUntilPossibleMitigationsLoaded(); // Possible Mitigation Section should exist @@ -632,6 +642,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const fieldLimitMessageExists = await PageObjects.datasetQuality.doesTextExist( 'datasetQualityDetailsDegradedFieldFlyoutFieldValue-cause', @@ -649,6 +661,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const limitExists = await PageObjects.datasetQuality.doesTextExist( 'datasetQualityDetailsDegradedFieldFlyoutFieldValue-mappingLimit', @@ -666,6 +680,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail( PageObjects.datasetQuality.testSubjectSelectors .datasetQualityDetailsDegradedFieldFlyoutIssueDoesNotExist @@ -680,6 +696,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project.id', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + // Field Limit Mitigation Section should exist await testSubjects.existOrFail( 'datasetQualityDetailsDegradedFieldFlyoutFieldLimitMitigationAccordion' @@ -710,6 +728,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + // Field Limit Mitigation Section should exist await testSubjects.existOrFail( 'datasetQualityDetailsDegradedFieldFlyoutFieldLimitMitigationAccordion' @@ -732,6 +752,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project.id', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + // Should display current field limit await testSubjects.existOrFail('datasetQualityIncreaseFieldMappingCurrentLimitFieldText'); @@ -782,6 +804,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project.id', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + // Should not allow values less than current limit of 44 await testSubjects.setValue( 'datasetQualityIncreaseFieldMappingProposedLimitFieldText', @@ -816,6 +840,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project.id', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.tryForTime(5000, async () => { const applyButton = await testSubjects.find( 'datasetQualityIncreaseFieldMappingLimitButtonButton' @@ -835,6 +861,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expandedDegradedField: 'cloud.project.id', }); + await PageObjects.header.waitUntilLoadingHasFinished(); + const applyButton = await testSubjects.find( 'datasetQualityIncreaseFieldMappingLimitButtonButton' );