Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dataset Quality] Fix tests for degraded fields flyout #202288

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -666,6 +680,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expandedDegradedField: 'cloud',
});

await PageObjects.header.waitUntilLoadingHasFinished();

await testSubjects.existOrFail(
PageObjects.datasetQuality.testSubjectSelectors
.datasetQualityDetailsDegradedFieldFlyoutIssueDoesNotExist
Expand All @@ -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'
Expand Down Expand Up @@ -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'
Expand All @@ -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');

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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'
Expand All @@ -835,6 +861,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expandedDegradedField: 'cloud.project.id',
});

await PageObjects.header.waitUntilLoadingHasFinished();

const applyButton = await testSubjects.find(
'datasetQualityIncreaseFieldMappingLimitButtonButton'
);
Expand Down