From 7e8798efd2aedccd6511ac64024b2e4259de6400 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 30 Sep 2020 21:22:58 +0200 Subject: [PATCH] [Discover] Fix functional time picker test permissions (#78564) (#79002) --- .../discover/_indexpattern_without_timefield.ts | 3 +++ test/functional/config.js | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/test/functional/apps/discover/_indexpattern_without_timefield.ts b/test/functional/apps/discover/_indexpattern_without_timefield.ts index 99a7045551dc9..677b27c31bd86 100644 --- a/test/functional/apps/discover/_indexpattern_without_timefield.ts +++ b/test/functional/apps/discover/_indexpattern_without_timefield.ts @@ -22,16 +22,19 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); + const security = getService('security'); const PageObjects = getPageObjects(['common', 'timePicker', 'discover']); describe('indexpattern without timefield', () => { before(async () => { + await security.testUser.setRoles(['kibana_admin', 'kibana_timefield']); await esArchiver.loadIfNeeded('index_pattern_without_timefield'); await kibanaServer.uiSettings.replace({ defaultIndex: 'without-timefield' }); await PageObjects.common.navigateToApp('discover'); }); after(async () => { + await security.testUser.restoreDefaults(); await esArchiver.unload('index_pattern_without_timefield'); }); diff --git a/test/functional/config.js b/test/functional/config.js index 15097d9346471..6081810d41272 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -229,6 +229,21 @@ export default async function ({ readConfigFile }) { kibana: [], }, + kibana_timefield: { + elasticsearch: { + cluster: [], + indices: [ + { + names: ['without-timefield', 'with-timefield'], + privileges: ['read', 'view_index_metadata'], + field_security: { grant: ['*'], except: [] }, + }, + ], + run_as: [], + }, + kibana: [], + }, + kibana_large_strings: { elasticsearch: { cluster: [],