[Dataset Quality] Wrap Discover data view checks in retries (#214172)

## 📝 Summary

This wraps the checks for the correct data view after navigation to
Discover into retries in the dataset quality functional tests, because
these checks recently failed because loading was not yet finished.

🏁 closes https://github.com/elastic/kibana/issues/213751
🏁 closes https://github.com/elastic/kibana/issues/214029
🏁 closes https://github.com/elastic/kibana/issues/214183
This commit is contained in:
Felix Stürmer 2025-03-13 12:29:44 +01:00 committed by GitHub
parent 37c88f9618
commit 535b015271
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 7 deletions

View file

@ -330,8 +330,10 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid
await discoverButton.click();
// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(regularDatasetName);
await retry.try(async () => {
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(regularDatasetName);
});
});
it('should go discover for degraded docs when the button next to breakdown selector is clicked', async () => {
@ -344,8 +346,10 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid
);
// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(apacheAccessDatasetName);
await retry.try(async () => {
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(apacheAccessDatasetName);
});
});
});

View file

@ -26,6 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'svlCommonNavigation',
'svlCommonPage',
]);
const retry = getService('retry');
const synthtrace = getService('svlLogsSynthtraceClient');
const to = '2024-01-01T12:00:00.000Z';
const apacheAccessDatasetName = 'apache.access';
@ -144,9 +145,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await (await actionsCol.getCellChildren('a'))[rowIndexToOpen].click(); // Click "Open"
// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(datasetName);
await retry.try(async () => {
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(datasetName);
});
// Return to Dataset Quality Page
await PageObjects.datasetQuality.navigateTo();