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 8f485af363e4..51b4163fa71f 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 @@ -7,7 +7,13 @@ import expect from '@kbn/expect'; import { DatasetQualityFtrProviderContext } from './config'; -import { datasetNames, getInitialTestLogs, getLogsForDataset, productionNamespace } from './data'; +import { + createFailedRecords, + datasetNames, + getInitialTestLogs, + getLogsForDataset, + productionNamespace, +} from './data'; export default function ({ getService, getPageObjects }: DatasetQualityFtrProviderContext) { const PageObjects = getPageObjects([ @@ -19,6 +25,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const synthtrace = getService('logSynthtraceEsClient'); const testSubjects = getService('testSubjects'); const to = '2024-01-01T12:00:00.000Z'; + const failedDatasetName = 'synth.failed'; const apacheAccessDatasetName = 'apache.access'; const apacheAccessDatasetHumanName = 'Apache access logs'; const apacheIntegrationName = 'Apache HTTP Server'; @@ -50,6 +57,13 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid dataset: apacheAccessDatasetName, namespace: productionNamespace, }), + // Ingest Failed Logs + createFailedRecords({ + to: new Date().toISOString(), + count: 10, + dataset: failedDatasetName, + rate: 0.5, + }), ]); await PageObjects.datasetQuality.navigateTo(); }); @@ -143,7 +157,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const expectedQuality = 'Poor'; // Get default quality const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetQuality = cols['Data Set Quality']; + const datasetQuality = cols['Data set quality']; const datasetQualityCellTexts = await datasetQuality.getCellTexts(); expect(datasetQualityCellTexts).to.contain(expectedQuality); @@ -151,7 +165,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid await PageObjects.datasetQuality.filterForQualities([expectedQuality]); const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetQualityAfterFilter = colsAfterFilter['Data Set Quality']; + const datasetQualityAfterFilter = colsAfterFilter['Data set quality']; const datasetQualityCellTextsAfterFilter = await datasetQualityAfterFilter.getCellTexts(); expect(datasetQualityCellTextsAfterFilter).to.eql([expectedQuality]); 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 6a0742367584..972b7bb42016 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 @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import { createFailedRecords } from '@kbn/test-suites-xpack/functional/apps/dataset_quality/data'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { datasetNames, getInitialTestLogs, getLogsForDataset, productionNamespace } from './data'; @@ -20,6 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const synthtrace = getService('svlLogsSynthtraceClient'); const testSubjects = getService('testSubjects'); const to = '2024-01-01T12:00:00.000Z'; + const failedDatasetName = 'synth.failed'; const apacheAccessDatasetName = 'apache.access'; const apacheAccessDatasetHumanName = 'Apache access logs'; const apacheIntegrationName = 'Apache HTTP Server'; @@ -51,6 +53,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { dataset: apacheAccessDatasetName, namespace: productionNamespace, }), + // Ingest Failed Logs + createFailedRecords({ + to: new Date().toISOString(), + count: 10, + dataset: failedDatasetName, + rate: 0.5, + }), ]); await PageObjects.svlCommonPage.loginWithPrivilegedRole(); await PageObjects.datasetQuality.navigateTo(); @@ -142,7 +151,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const expectedQuality = 'Poor'; // Get default quality const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetQuality = cols['Data Set Quality']; + const datasetQuality = cols['Data set quality']; const datasetQualityCellTexts = await datasetQuality.getCellTexts(); expect(datasetQualityCellTexts).to.contain(expectedQuality); @@ -150,7 +159,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.datasetQuality.filterForQualities([expectedQuality]); const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetQualityAfterFilter = colsAfterFilter['Data Set Quality']; + const datasetQualityAfterFilter = colsAfterFilter['Data set quality']; const datasetQualityCellTextsAfterFilter = await datasetQualityAfterFilter.getCellTexts(); expect(datasetQualityCellTextsAfterFilter).to.eql([expectedQuality]);