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

[9.0] [Dataset Quality] Fix flaky tests discover navigation (#208909) #209244

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
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 @@ -318,22 +318,22 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid
});

describe('navigation', () => {
it('should go to log explorer page when the open in log explorer button is clicked', async () => {
it('should go to discover page when the open in discover button is clicked', async () => {
await PageObjects.datasetQuality.navigateToDetails({
dataStream: regularDataStreamName,
});

const logExplorerButton =
const discoverButton =
await PageObjects.datasetQuality.getDatasetQualityDetailsHeaderButton();

await logExplorerButton.click();
await discoverButton.click();

// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(regularDatasetName);
});

it('should go log explorer for degraded docs when the button next to breakdown selector is clicked', async () => {
it('should go discover for degraded docs when the button next to breakdown selector is clicked', async () => {
await PageObjects.datasetQuality.navigateToDetails({
dataStream: apacheAccessDataStreamName,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('Dataset quality details', function () {
// see details: https://github.com/elastic/kibana/issues/206734
this.tags(['failsOnMKI']);

before(async () => {
// Install Apache Integration and ingest logs for it
await PageObjects.observabilityLogsExplorer.installPackage(apachePkg);
Expand Down Expand Up @@ -326,22 +326,25 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

describe('navigation', () => {
it('should go to log explorer page when the open in log explorer button is clicked', async () => {
it('should go to discover page when the open in discover button is clicked', async () => {
await PageObjects.datasetQuality.navigateToDetails({
dataStream: regularDataStreamName,
});

const logExplorerButton =
const discoverButton =
await PageObjects.datasetQuality.getDatasetQualityDetailsHeaderButton();

await logExplorerButton.click();
await discoverButton.click();

// Confirm dataset selector text in discover
await retry.tryForTime(5000, async () => {
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();

// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(regularDatasetName);
originalExpect(datasetSelectorText).toMatch(regularDatasetName);
});
});

it('should go log explorer for degraded docs when the button next to breakdown selector is clicked', async () => {
it('should go discover for degraded docs when the button next to breakdown selector is clicked', async () => {
await PageObjects.datasetQuality.navigateToDetails({
dataStream: apacheAccessDataStreamName,
});
Expand All @@ -350,9 +353,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
PageObjects.datasetQuality.testSubjectSelectors.datasetQualityDetailsLinkToDiscover
);

// Confirm dataset selector text in observability logs explorer
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(apacheAccessDatasetName);
// Confirm dataset selector text in discover
await retry.tryForTime(5000, async () => {
const datasetSelectorText = await PageObjects.discover.getCurrentDataViewId();
originalExpect(datasetSelectorText).toMatch(apacheAccessDatasetName);
});
});
});

Expand Down