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

Index pattern management - fix refresh of index pattern list after delete #92619

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function getIndexPatterns(
indexPatternManagementStart: IndexPatternManagementStart,
indexPatternsService: IndexPatternsContract
) {
const existingIndexPatterns = await indexPatternsService.getIdsWithTitle();
const existingIndexPatterns = await indexPatternsService.getIdsWithTitle(true);
const indexPatternsListItems = await Promise.all(
existingIndexPatterns.map(async ({ id, title }) => {
const isDefault = defaultIndex === id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function ({ getService, getPageObjects }) {
const kibanaServer = getService('kibanaServer');
const testSubjects = getService('testSubjects');
const es = getService('legacyEs');
const PageObjects = getPageObjects(['settings', 'common']);
const PageObjects = getPageObjects(['settings', 'common', 'header']);
const security = getService('security');

describe('"Create Index Pattern" wizard', function () {
Expand Down Expand Up @@ -60,6 +60,12 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.settings.createIndexPattern('alias1', false);
});

it('can delete an index pattern', async () => {
await PageObjects.settings.removeIndexPattern();
await PageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.exists('indexPatternTable');
});

after(async () => {
await es.transport.request({
path: '/_aliases',
Expand Down