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

* refresh id and title list

* add functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Matthew Kime <matt@mattki.me>
This commit is contained in:
Kibana Machine 2021-04-12 12:37:08 -04:00 committed by GitHub
parent 8fe4a858bf
commit bed793e8a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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;

View file

@ -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 () {
@ -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',