diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index ab581beeb8b3b..5c51a8e76dcad 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -357,7 +357,12 @@ export class SettingsPageObject extends FtrService { } await this.header.waitUntilLoadingHasFinished(); - await this.clickAddNewIndexPatternButton(); + const flyOut = await this.testSubjects.exists('createAnyway'); + if (flyOut) { + await this.testSubjects.click('createAnyway'); + } else { + await this.clickAddNewIndexPatternButton(); + } await this.header.waitUntilLoadingHasFinished(); if (!isStandardIndexPattern) { await this.selectRollupIndexPatternType(); diff --git a/x-pack/test/functional/apps/management/create_index_pattern_wizard.js b/x-pack/test/functional/apps/management/create_index_pattern_wizard.js index 445e340d236e6..9061817bbce79 100644 --- a/x-pack/test/functional/apps/management/create_index_pattern_wizard.js +++ b/x-pack/test/functional/apps/management/create_index_pattern_wizard.js @@ -8,14 +8,20 @@ export default function ({ getService, getPageObjects }) { const kibanaServer = getService('kibanaServer'); const es = getService('es'); + const security = getService('security'); const PageObjects = getPageObjects(['settings', 'common']); + const soInfo = getService('savedObjectInfo'); + const log = getService('log'); describe('"Create Index Pattern" wizard', function () { before(async function () { - // delete .kibana index and then wait for Kibana to re-create it + await soInfo.logSoTypes(log); + await security.testUser.setRoles([ + 'global_index_pattern_management_all', + 'test_logs_data_reader', + ]); await kibanaServer.uiSettings.replace({}); await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); }); describe('data streams', () => { @@ -43,13 +49,19 @@ export default function ({ getService, getPageObjects }) { method: 'PUT', }); + await PageObjects.settings.clickKibanaIndexPatterns(); await PageObjects.settings.createIndexPattern('test_data_stream'); + }); + }); - await es.transport.request({ - path: '/_data_stream/test_data_stream', - method: 'DELETE', - }); + after(async () => { + await kibanaServer.savedObjects.clean({ types: ['index-pattern'] }); + await es.transport.request({ + path: '/_data_stream/test_data_stream', + method: 'DELETE', }); + await security.testUser.restoreDefaults(); + await soInfo.logSoTypes(log); }); }); } diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index 06e58638922d4..704ce819b5b38 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -384,6 +384,17 @@ export default async function ({ readConfigFile }) { }, }, + test_logs_data_reader: { + elasticsearch: { + indices: [ + { + names: ['test_data_stream'], + privileges: ['read', 'view_index_metadata'], + }, + ], + }, + }, + geoall_data_writer: { elasticsearch: { indices: [