diff --git a/test/functional/apps/discover/_filter_editor.ts b/test/functional/apps/discover/_filter_editor.ts index 0fb8837598904..b2fbfbb71c7ee 100644 --- a/test/functional/apps/discover/_filter_editor.ts +++ b/test/functional/apps/discover/_filter_editor.ts @@ -16,6 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const filterBar = getService('filterBar'); + const security = getService('security'); const PageObjects = getPageObjects(['common', 'discover', 'timePicker']); const defaultSettings = { defaultIndex: 'logstash-*', @@ -23,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover filter editor', function describeIndexTests() { before(async function () { + await security.testUser.setRoles(['kibana_admin', 'version_test', 'test_logstash_reader']); log.debug('load kibana index with default index pattern'); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); @@ -111,5 +113,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); }); + + after(async () => { + await security.testUser.restoreDefaults(); + }); }); }