Skip to content

Commit ad2dc4e

Browse files
committed
[Discover] Fix histogram cloud tests (#75268)
1 parent 4cbf55c commit ad2dc4e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/functional/apps/discover/_discover_histogram.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
2424
const esArchiver = getService('esArchiver');
2525
const elasticChart = getService('elasticChart');
2626
const kibanaServer = getService('kibanaServer');
27+
const security = getService('security');
2728
const PageObjects = getPageObjects(['settings', 'common', 'discover', 'header', 'timePicker']);
2829
const defaultSettings = {
2930
defaultIndex: 'long-window-logstash-*',
@@ -35,12 +36,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3536
await esArchiver.loadIfNeeded('logstash_functional');
3637
await esArchiver.load('long_window_logstash');
3738
await esArchiver.load('long_window_logstash_index_pattern');
39+
await security.testUser.setRoles(['kibana_admin', 'long_window_logstash']);
3840
await kibanaServer.uiSettings.replace(defaultSettings);
3941
await PageObjects.common.navigateToApp('discover');
4042
});
4143
after(async () => {
4244
await esArchiver.unload('long_window_logstash');
4345
await esArchiver.unload('long_window_logstash_index_pattern');
46+
await security.testUser.restoreDefaults();
4447
});
4548

4649
async function prepareTest(fromTime: string, toTime: string, interval: string) {

0 commit comments

Comments
 (0)