Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrdyn committed Nov 26, 2024
1 parent 0057ecb commit f10abac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('generateDatasets', () => {
userPrivileges: {
canMonitor: true,
},
docsInTimeRange: 100,
docsInTimeRange: 102,
quality: 'degraded',
degradedDocs: {
percentage: 0,
Expand Down Expand Up @@ -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,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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]]);

Expand All @@ -104,15 +104,15 @@ 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);

// Filter for integration
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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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
Expand All @@ -104,15 +104,15 @@ 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);

// Filter for integration
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
Expand Down

0 comments on commit f10abac

Please sign in to comment.