mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ftr] split dashboard_elements/config to speedup CI run (#160550)
## Summary Splitting FTR config as it consistently takes over 37 minutes to run. This PR splits it into 5 smaller configs: - test/functional/apps/dashboard_elements/controls/common/config.ts 15m 24s - test/functional/apps/dashboard_elements/controls/options_list/config.ts 17m 38s - test/functional/apps/dashboard_elements/image_embeddable/config.ts 2m 14s - test/functional/apps/dashboard_elements/input_control_vis/config.ts 4m 41s - test/functional/apps/dashboard_elements/markdown/config.ts 1m 24s
This commit is contained in:
parent
1223c3f55f
commit
599bbacab0
17 changed files with 137 additions and 53 deletions
|
@ -9,10 +9,13 @@
|
|||
import { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const functionalConfig = await readConfigFile(require.resolve('../../config.base.js'));
|
||||
const functionalConfig = await readConfigFile(require.resolve('../../../../config.base.js'));
|
||||
|
||||
return {
|
||||
...functionalConfig.getAll(),
|
||||
testFiles: [require.resolve('.')],
|
||||
junit: {
|
||||
reportName: 'Dashboard Elements - Controls tests',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -11,8 +11,8 @@ import { pick } from 'lodash';
|
|||
import expect from '@kbn/expect';
|
||||
import { OPTIONS_LIST_CONTROL } from '@kbn/controls-plugin/common';
|
||||
|
||||
import { OPTIONS_LIST_ANIMAL_SOUND_SUGGESTIONS } from '../../../page_objects/dashboard_page_controls';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { OPTIONS_LIST_ANIMAL_SOUND_SUGGESTIONS } from '../../../../page_objects/dashboard_page_controls';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const retry = getService('retry');
|
|
@ -9,7 +9,7 @@
|
|||
import { OPTIONS_LIST_CONTROL } from '@kbn/controls-plugin/common';
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const testSubjects = getService('testSubjects');
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile, getService, getPageObjects }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
@ -47,7 +47,6 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
|
|||
before(setup);
|
||||
after(teardown);
|
||||
loadTestFile(require.resolve('./control_group_settings'));
|
||||
loadTestFile(require.resolve('./options_list'));
|
||||
loadTestFile(require.resolve('./range_slider'));
|
||||
loadTestFile(require.resolve('./time_slider'));
|
||||
loadTestFile(require.resolve('./control_group_chaining'));
|
|
@ -9,7 +9,7 @@
|
|||
import { RANGE_SLIDER_CONTROL } from '@kbn/controls-plugin/common';
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const retry = getService('retry');
|
|
@ -9,7 +9,7 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { OPTIONS_LIST_CONTROL, RANGE_SLIDER_CONTROL } from '@kbn/controls-plugin/common';
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const testSubjects = getService('testSubjects');
|
|
@ -9,7 +9,7 @@
|
|||
import { RANGE_SLIDER_CONTROL } from '@kbn/controls-plugin/common';
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
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('.')],
|
||||
junit: {
|
||||
reportName: 'Dashboard Elements - Controls Options List tests',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -12,12 +12,22 @@ export const OPTIONS_LIST_DASHBOARD_NAME = 'Test Options List Control';
|
|||
|
||||
export default function ({ loadTestFile, getService, getPageObjects }: FtrProviderContext) {
|
||||
const elasticChart = getService('elasticChart');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const security = getService('security');
|
||||
|
||||
const { timePicker, dashboard, common } = getPageObjects(['timePicker', 'dashboard', 'common']);
|
||||
|
||||
const setup = async () => {
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data');
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
await kibanaServer.importExport.load(
|
||||
'test/functional/fixtures/kbn_archiver/dashboard/current/kibana'
|
||||
);
|
||||
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
|
||||
await kibanaServer.uiSettings.replace({
|
||||
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
|
||||
});
|
||||
|
||||
await common.navigateToApp('dashboard');
|
||||
await dashboard.gotoDashboardLandingPage();
|
||||
|
@ -31,7 +41,9 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
|
|||
};
|
||||
|
||||
const teardown = async () => {
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data');
|
||||
await security.testUser.restoreDefaults();
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
};
|
||||
|
||||
describe('Options list control', async () => {
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
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('.')],
|
||||
junit: {
|
||||
reportName: 'Dashboard Elements - Image Embeddable tests',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
||||
const browser = getService('browser');
|
||||
const log = getService('log');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
||||
describe('dashboard elements', () => {
|
||||
before(async () => {
|
||||
log.debug('Starting before method');
|
||||
await browser.setWindowSize(1280, 800);
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/long_window_logstash');
|
||||
});
|
||||
|
||||
describe('dashboard elements', function () {
|
||||
loadTestFile(require.resolve('./input_control_vis'));
|
||||
loadTestFile(require.resolve('./controls'));
|
||||
loadTestFile(require.resolve('./_markdown_vis'));
|
||||
loadTestFile(require.resolve('./image_embeddable'));
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
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('.')],
|
||||
junit: {
|
||||
reportName: 'Dashboard Elements - Input Controls tests',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -8,8 +8,26 @@
|
|||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
||||
const browser = getService('browser');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
||||
describe('input controls', function () {
|
||||
before(async () => {
|
||||
await browser.setWindowSize(1280, 800);
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/long_window_logstash');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await kibanaServer.savedObjects.cleanStandardList();
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
|
||||
await esArchiver.unload('test/functional/fixtures/es_archiver/long_window_logstash');
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./input_control_options'));
|
||||
loadTestFile(require.resolve('./dynamic_options'));
|
||||
loadTestFile(require.resolve('./chained_controls'));
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'header']);
|
21
test/functional/apps/dashboard_elements/markdown/config.ts
Normal file
21
test/functional/apps/dashboard_elements/markdown/config.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
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('./_markdown_vis')],
|
||||
junit: {
|
||||
reportName: 'Dashboard Elements - Markdown tests',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -18,7 +18,11 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
|
||||
testFiles: [
|
||||
require.resolve('../apps/dashboard/group4/dashboard_save'),
|
||||
require.resolve('../apps/dashboard_elements'),
|
||||
require.resolve('../apps/dashboard_elements/controls/common'),
|
||||
require.resolve('../apps/dashboard_elements/controls/options_list'),
|
||||
require.resolve('../apps/dashboard_elements/image_embeddable'),
|
||||
require.resolve('../apps/dashboard_elements/input_control_vis'),
|
||||
require.resolve('../apps/dashboard_elements/markdown/_markdown_vis.ts'),
|
||||
],
|
||||
|
||||
junit: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue