From f10abac04bc3fd8321ed0276cb26794643c2b73e Mon Sep 17 00:00:00 2001 From: Yngrid Coello Date: Tue, 26 Nov 2024 15:36:16 -0300 Subject: [PATCH] fixing tests --- .../public/utils/generate_datasets.test.ts | 8 ++++---- .../apps/dataset_quality/dataset_quality_table.ts | 2 +- .../dataset_quality/dataset_quality_table_filters.ts | 10 +++++----- .../dataset_quality/dataset_quality_table_filters.ts | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts index 2b4a25d60313d..135979e63fb60 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/utils/generate_datasets.test.ts @@ -110,7 +110,7 @@ describe('generateDatasets', () => { userPrivileges: { canMonitor: true, }, - docsInTimeRange: 100, + docsInTimeRange: 102, quality: 'degraded', degradedDocs: { percentage: 0, @@ -173,14 +173,14 @@ describe('generateDatasets', () => { userPrivileges: { canMonitor: true, }, - docsInTimeRange: 0, - quality: 'good', + docsInTimeRange: 2, + quality: 'poor', degradedDocs: { percentage: 0, count: 0, }, failedDocs: { - percentage: 0, + percentage: 100, count: 2, }, }, diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts index 4edacd68f02a0..32a3368d435a2 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts @@ -136,7 +136,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const degradedDocsCol = cols['Degraded docs (%)']; const degradedDocsColCellTexts = await degradedDocsCol.getCellTexts(); - expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%', '100%']); + expect(degradedDocsColCellTexts).to.eql(['0%', '0%', '0%', '100%', '0%']); }); it('shows failed docs percentage', async () => { 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 3c8c3e702d576..8f485af363e48 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 @@ -61,7 +61,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid it('shows full dataset names when toggled', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -83,7 +83,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid it('searches the datasets', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -94,7 +94,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid ); const colsAfterSearch = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameColAfterSearch = colsAfterSearch['Data Set Name']; + const datasetNameColAfterSearch = colsAfterSearch['Data set name']; const datasetNameColCellTextsAfterSearch = await datasetNameColAfterSearch.getCellTexts(); expect(datasetNameColCellTextsAfterSearch).to.eql([datasetNames[2]]); @@ -104,7 +104,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid it('filters for integration', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -112,7 +112,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid await PageObjects.datasetQuality.filterForIntegrations([apacheIntegrationName]); const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameColAfterFilter = colsAfterFilter['Data Set Name']; + const datasetNameColAfterFilter = colsAfterFilter['Data set name']; const datasetNameColCellTextsAfterFilter = await datasetNameColAfterFilter.getCellTexts(); expect(datasetNameColCellTextsAfterFilter).to.eql([apacheAccessDatasetHumanName]); 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 d57f852c0e700..6a0742367584d 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 @@ -63,7 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('shows full dataset names when toggled', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -84,7 +84,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('searches the datasets', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -95,7 +95,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); const colsAfterSearch = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameColAfterSearch = colsAfterSearch['Data Set Name']; + const datasetNameColAfterSearch = colsAfterSearch['Data set name']; const datasetNameColCellTextsAfterSearch = await datasetNameColAfterSearch.getCellTexts(); expect(datasetNameColCellTextsAfterSearch).to.eql([datasetNames[2]]); // Reset the search field @@ -104,7 +104,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('filters for integration', async () => { const cols = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameCol = cols['Data Set Name']; + const datasetNameCol = cols['Data set name']; const datasetNameColCellTexts = await datasetNameCol.getCellTexts(); expect(datasetNameColCellTexts).to.eql(allDatasetNames); @@ -112,7 +112,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.datasetQuality.filterForIntegrations([apacheIntegrationName]); const colsAfterFilter = await PageObjects.datasetQuality.parseDatasetTable(); - const datasetNameColAfterFilter = colsAfterFilter['Data Set Name']; + const datasetNameColAfterFilter = colsAfterFilter['Data set name']; const datasetNameColCellTextsAfterFilter = await datasetNameColAfterFilter.getCellTexts(); expect(datasetNameColCellTextsAfterFilter).to.eql([apacheAccessDatasetHumanName]); // Reset the filter by selecting from the dropdown again