Skip to content

Commit

Permalink
[ftr] unskip tests that failed due to auth issue or navigation (elast…
Browse files Browse the repository at this point in the history
…ic#168006)

## Summary

While debugging MKI failures I found some tests that should be stable
without modification. I added waiting for page to loaded in some places
though.


https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3340
60x for examples & 20x for oblt configs
  • Loading branch information
dmlemeshko authored Oct 5, 2023
1 parent a2a7f42 commit 4f9e749
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

// Failing: See https://github.com/elastic/kibana/issues/165730
// FLAKY: https://github.com/elastic/kibana/issues/165735
describe.skip('Search example', () => {
describe('Search example', () => {
describe('with bfetch', () => {
testSearchExample();
});
Expand Down Expand Up @@ -83,7 +83,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

it('should handle warnings', async () => {
// failing because no toasts are displayed
it.skip('should handle warnings', async () => {
await testSubjects.click('searchWithWarning');
await retry.waitFor('', async () => {
const toastCount = await toasts.getToastCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
const retry = getService('retry');
const PageObjects = getPageObjects(['common', 'observabilityLogExplorer']);
const PageObjects = getPageObjects([
'common',
'observabilityLogExplorer',
'svlCommonPage',
'header',
]);

// https://github.com/elastic/kibana/issues/166016
describe('DatasetSelection initialization and update', () => {
before(async () => {
await PageObjects.svlCommonPage.login();
});

after(async () => {
await PageObjects.svlCommonPage.forceLogout();
});

// FLAKY: https://github.com/elastic/kibana/issues/166016
describe.skip('DatasetSelection initialization and update', () => {
describe('when the "index" query param does not exist', () => {
it('should initialize the "All logs" selection', async () => {
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.header.waitUntilLoadingHasFinished();
const datasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();

Expand All @@ -35,6 +49,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
_a: rison.encode({ index: azureActivitylogsIndex }),
}),
});
await PageObjects.header.waitUntilLoadingHasFinished();

const datasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
Expand All @@ -49,6 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
_a: rison.encode({ index: invalidEncodedIndex }),
}),
});
await PageObjects.header.waitUntilLoadingHasFinished();

const datasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
Expand All @@ -61,6 +77,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('when navigating back and forth on the page history', () => {
it('should decode and restore the selection for the current index', async () => {
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.header.waitUntilLoadingHasFinished();
const allDatasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
expect(allDatasetSelectionTitle).to.be('All logs');
Expand All @@ -73,13 +90,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
controlPanels: rison.encode({}),
}),
});
await PageObjects.header.waitUntilLoadingHasFinished();
const azureDatasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
expect(azureDatasetSelectionTitle).to.be('[Azure Logs] activitylogs');

// Go back to previous page selection
await retry.try(async () => {
await browser.goBack();
await PageObjects.header.waitUntilLoadingHasFinished();
const backNavigationDatasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
expect(backNavigationDatasetSelectionTitle).to.be('All logs');
Expand All @@ -88,6 +107,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// Go forward to previous page selection
await retry.try(async () => {
await browser.goForward();
await PageObjects.header.waitUntilLoadingHasFinished();
const forwardNavigationDatasetSelectionTitle =
await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText();
expect(forwardNavigationDatasetSelectionTitle).to.be('[Azure Logs] activitylogs');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'observabilityLogExplorer',
'svlCommonPage',
'timePicker',
'header',
]);

// FLAKY: https://github.com/elastic/kibana/issues/167189
describe.skip('Header menu', () => {
describe('Header menu', () => {
before(async () => {
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
await esArchiver.load(
'x-pack/test/functional/es_archives/observability_log_explorer/data_streams'
);
await PageObjects.svlCommonPage.login();
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.header.waitUntilLoadingHasFinished();
});

after(async () => {
Expand All @@ -47,6 +49,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('Discover fallback link', () => {
before(async () => {
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.header.waitUntilLoadingHasFinished();
});

it('should render a button link ', async () => {
Expand Down Expand Up @@ -99,6 +102,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('Add data link', () => {
before(async () => {
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.header.waitUntilLoadingHasFinished();
});

it('should render a button link ', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {

it('should show search specific empty page in discover', async () => {
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'discover' });
await testSubjects.existOrFail('~breadcrumb-deepLinkId-discover');
await testSubjects.existOrFail('kbnOverviewElasticsearchGettingStarted');
await testSubjects.click('kbnOverviewElasticsearchGettingStarted');
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Getting started' });
});

it('should show search specific empty page in visualize', async () => {
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'visualize' });
await testSubjects.existOrFail('~breadcrumb-deepLinkId-visualize');
await testSubjects.existOrFail('kbnOverviewElasticsearchGettingStarted');
await testSubjects.click('kbnOverviewElasticsearchGettingStarted');
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Getting started' });
});

it('should show search specific empty page in dashboards', async () => {
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'dashboards' });
await testSubjects.existOrFail('~breadcrumb-deepLinkId-dashboards');
await testSubjects.existOrFail('kbnOverviewElasticsearchGettingStarted');
await testSubjects.click('kbnOverviewElasticsearchGettingStarted');
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Getting started' });
Expand Down

0 comments on commit 4f9e749

Please sign in to comment.