-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lens] move
open_in_lens
out of ftr group3 (#143666)
- Loading branch information
Spencer
authored
Oct 19, 2022
1 parent
8c65dd1
commit 1994a16
Showing
18 changed files
with
106 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
x-pack/test/functional/apps/lens/group3/open_in_lens/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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('.')], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters