mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[lens] move open_in_lens
out of ftr group3 (#143666)
This commit is contained in:
parent
8c65dd16aa
commit
1994a162de
18 changed files with 106 additions and 29 deletions
|
@ -176,6 +176,7 @@ enabled:
|
|||
- x-pack/test/functional/apps/lens/group1/config.ts
|
||||
- x-pack/test/functional/apps/lens/group2/config.ts
|
||||
- x-pack/test/functional/apps/lens/group3/config.ts
|
||||
- x-pack/test/functional/apps/lens/open_in_lens/config.ts
|
||||
- x-pack/test/functional/apps/license_management/config.ts
|
||||
- x-pack/test/functional/apps/logstash/config.ts
|
||||
- x-pack/test/functional/apps/management/config.ts
|
||||
|
|
|
@ -86,7 +86,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
|
|||
loadTestFile(require.resolve('./error_handling'));
|
||||
loadTestFile(require.resolve('./lens_tagging'));
|
||||
loadTestFile(require.resolve('./lens_reporting'));
|
||||
loadTestFile(require.resolve('./open_in_lens'));
|
||||
// keep these two last in the group in this order because they are messing with the default saved objects
|
||||
loadTestFile(require.resolve('./rollup'));
|
||||
loadTestFile(require.resolve('./no_data'));
|
||||
|
|
|
@ -1,15 +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; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('Open in Lens', function () {
|
||||
loadTestFile(require.resolve('./tsvb'));
|
||||
loadTestFile(require.resolve('./agg_based'));
|
||||
});
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, lens, timePicker, visEditor, visChart } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, lens, visChart, timePicker, visEditor } = getPageObjects([
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('Agg based Vis to Lens', function () {
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visEditor, visualize, lens, timePicker, visChart } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visEditor, lens, timePicker, header } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visEditor, lens, timePicker, header } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visEditor, lens, timePicker, header, visChart } = getPageObjects([
|
17
x-pack/test/functional/apps/lens/open_in_lens/config.ts
Normal file
17
x-pack/test/functional/apps/lens/open_in_lens/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('.')],
|
||||
};
|
||||
}
|
75
x-pack/test/functional/apps/lens/open_in_lens/index.ts
Normal file
75
x-pack/test/functional/apps/lens/open_in_lens/index.ts
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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 PageObjects = getPageObjects(['timePicker']);
|
||||
const config = getService('config');
|
||||
let remoteEsArchiver;
|
||||
|
||||
describe('lens app - Open in Lens', () => {
|
||||
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 () => {
|
||||
log.debug('Starting lens before method');
|
||||
await browser.setWindowSize(1280, 1200);
|
||||
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 PageObjects.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 PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings();
|
||||
await kibanaServer.importExport.unload(fixtureDirs.lensBasic);
|
||||
await kibanaServer.importExport.unload(fixtureDirs.lensDefault);
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./tsvb'));
|
||||
loadTestFile(require.resolve('./agg_based'));
|
||||
});
|
||||
};
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visualBuilder, lens, timeToVisualize, dashboard, canvas } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visualBuilder, lens, header } = getPageObjects([
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('TSVB to Lens', function () {
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visualBuilder, lens, header } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visualBuilder, lens, header } = getPageObjects([
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const { visualize, visualBuilder, lens, header } = getPageObjects([
|
Loading…
Add table
Add a link
Reference in a new issue