mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Balance lens group4 config
This commit is contained in:
parent
9292005810
commit
c1b247e3cb
7 changed files with 99 additions and 5 deletions
|
@ -231,6 +231,7 @@ enabled:
|
|||
- x-pack/test/functional/apps/lens/group4/config.ts
|
||||
- x-pack/test/functional/apps/lens/group5/config.ts
|
||||
- x-pack/test/functional/apps/lens/group6/config.ts
|
||||
- x-pack/test/functional/apps/lens/group7/config.ts
|
||||
- x-pack/test/functional/apps/lens/open_in_lens/tsvb/config.ts
|
||||
- x-pack/test/functional/apps/lens/open_in_lens/agg_based/config.ts
|
||||
- x-pack/test/functional/apps/lens/open_in_lens/dashboard/config.ts
|
||||
|
|
|
@ -81,7 +81,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
|
|||
loadTestFile(require.resolve('./show_underlying_data_dashboard')); // 2m 10s
|
||||
loadTestFile(require.resolve('./share')); // 1m 20s
|
||||
// keep it last in the group
|
||||
loadTestFile(require.resolve('./tsdb')); // 1m
|
||||
loadTestFile(require.resolve('./logsdb')); // 1m
|
||||
loadTestFile(require.resolve('./tsdb')); // 3m 56s
|
||||
});
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
getDocsGenerator,
|
||||
setupScenarioRunner,
|
||||
sumFirstNValues,
|
||||
} from './tsdb_logsdb_helpers';
|
||||
} from '../tsdb_logsdb_helpers';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const { common, lens, dashboard } = getPageObjects(['common', 'lens', 'dashboard']);
|
||||
|
|
17
x-pack/test/functional/apps/lens/group7/config.ts
Normal file
17
x-pack/test/functional/apps/lens/group7/config.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));
|
||||
|
||||
return {
|
||||
...functionalConfig.getAll(),
|
||||
testFiles: [require.resolve('.')],
|
||||
};
|
||||
}
|
77
x-pack/test/functional/apps/lens/group7/index.ts
Normal file
77
x-pack/test/functional/apps/lens/group7/index.ts
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EsArchiver } from '@kbn/es-archiver';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext) => {
|
||||
const browser = getService('browser');
|
||||
const log = getService('log');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const { timePicker } = getPageObjects(['timePicker']);
|
||||
const config = getService('config');
|
||||
let remoteEsArchiver;
|
||||
|
||||
describe('lens app - group 4', () => {
|
||||
const esArchive = 'x-pack/test/functional/es_archives/logstash_functional';
|
||||
const localIndexPatternString = 'logstash-*';
|
||||
const remoteIndexPatternString = 'ftr-remote:logstash-*';
|
||||
const localFixtures = {
|
||||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json',
|
||||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/default',
|
||||
};
|
||||
|
||||
const remoteFixtures = {
|
||||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/lens_basic.json',
|
||||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/default',
|
||||
};
|
||||
let esNode: EsArchiver;
|
||||
let fixtureDirs: {
|
||||
lensBasic: string;
|
||||
lensDefault: string;
|
||||
};
|
||||
let indexPatternString: string;
|
||||
before(async () => {
|
||||
await log.debug('Starting lens before method');
|
||||
await browser.setWindowSize(1280, 1200);
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
try {
|
||||
config.get('esTestCluster.ccs');
|
||||
remoteEsArchiver = getService('remoteEsArchiver' as 'esArchiver');
|
||||
esNode = remoteEsArchiver;
|
||||
fixtureDirs = remoteFixtures;
|
||||
indexPatternString = remoteIndexPatternString;
|
||||
} catch (error) {
|
||||
esNode = esArchiver;
|
||||
fixtureDirs = localFixtures;
|
||||
indexPatternString = localIndexPatternString;
|
||||
}
|
||||
|
||||
await esNode.load(esArchive);
|
||||
// changing the timepicker default here saves us from having to set it in Discover (~8s)
|
||||
await timePicker.setDefaultAbsoluteRangeViaUiSettings();
|
||||
await kibanaServer.uiSettings.update({
|
||||
defaultIndex: indexPatternString,
|
||||
'dateFormat:tz': 'UTC',
|
||||
});
|
||||
await kibanaServer.importExport.load(fixtureDirs.lensBasic);
|
||||
await kibanaServer.importExport.load(fixtureDirs.lensDefault);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await esArchiver.unload(esArchive);
|
||||
await timePicker.resetDefaultAbsoluteRangeViaUiSettings();
|
||||
await kibanaServer.importExport.unload(fixtureDirs.lensBasic);
|
||||
await kibanaServer.importExport.unload(fixtureDirs.lensDefault);
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
});
|
||||
|
||||
// total run time ~30m
|
||||
loadTestFile(require.resolve('./logsdb')); // 30m
|
||||
});
|
||||
};
|
|
@ -14,7 +14,7 @@ import {
|
|||
getDocsGenerator,
|
||||
setupScenarioRunner,
|
||||
TIME_PICKER_FORMAT,
|
||||
} from './tsdb_logsdb_helpers';
|
||||
} from '../tsdb_logsdb_helpers';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const { common, lens, discover, header, timePicker } = getPageObjects([
|
|
@ -9,7 +9,7 @@ import { Client } from '@elastic/elasticsearch';
|
|||
import { MappingProperty } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
import moment from 'moment';
|
||||
import type { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export const TEST_DOC_COUNT = 100;
|
||||
export const TIME_PICKER_FORMAT = 'MMM D, YYYY [@] HH:mm:ss.SSS';
|
Loading…
Add table
Add a link
Reference in a new issue