kibana/test/plugin_functional/config.js
Stacey Gammon bd484391fc
Embeddable API V2 (#37510)
* Embeddable API plugin

* Expose new embeddableActions uiExport endpoint

* Add missing getInjectedUIAppVars to Server type

* Add jest tests

* Most basic skeleton of the sample plugin to see if it still kills ci

* strip even more out to see if it passes ci

* It passed, put back init fn

* add back in a uiExport to see if that is what is killing ci

* Passed again, add back embeddableActions uiExports and require kibana line

* Add everything back but the sass import

* Found two bugs with customize panel title action, added jest test coverage and fixes

* Functionally test embeddable explorer plugin

* Addressing review feedback part 1

* Simplify action context menu - remove support for nested actions/child panels, which was never exposed anyway.

* More review feedback

* Spread out orders to let developers inject their own actions in the middle.

* Remove check for overwriting ApplyFilterAction

* use createRegistry for EmbeddableFactoryRegistry

* Add comment for getInheritedInput

* Use kbn-es-query Filter types

* Fix missed file after createRegistry switch over for EmbeddableFactoryRegistry

* Use delete instead of setting to undefined

* upgrade EUI to match kibana version

* Add getIsContainer on base embeddable class

* Run functional tests of sample plugin

* move all tests classes outside __test__ and inside test_samples folder so not to potentially create issues with mocha

* fix: 🐛 remove unused imports

* fix: 🐛 set to undefined explicitly

* chore: refactored getRoot functionality

* fix: refactor miss from folder rename __test__ -> test_samples

* fix: add eui switch to let the user indicate “hide this title” to improve ux.

* fix: customize panel flout test

* Try to fix issue with multiple rxjs bundles I hit before.

See https://github.com/ReactiveX/rxjs/issues/3828

* Use an rxjs polyfill to work around the issue of multiple rxjs bundles

* chore: change customize panel flyout to modal post design feedback

* capitalize Reset

* fix: type errors in customize panel modal

* fix: remove extra line added to prevent EUICallout overflow from spilling over panel edges

The bug this was intended to fix doesn’t appear yet because dashboard isn’t using this, and it causes other issues, so for now, just remove.

* Clean up some classes and SASS

* Inline styles needed to get the containers to take up the full height of the app.

* Use the same old style of error messaging in panels

* chore: add untilEmbeddableLoaded tests, expose on interface, and use in embeddable_child_panel

* Remove unused styles, add padding

* Verify trigger Context containers an array of Filters for apply filter action

* Remove panel.embeddableId param, use panel.explicitInput.id instead

* Check `isCompatible` as well as the type guard needed for typescript.

* executeTriggerActions should account for getHref

* Remove unnecessary check for context being defined

* use npStart instead of getNewPlatform

* Conform to latest NP changes

* Use new np_mocks in all the tests

* Address review feedback on rxjs polyfill
2019-06-07 13:30:55 -04:00

62 lines
2.4 KiB
JavaScript

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import path from 'path';
import fs from 'fs';
export default async function ({ readConfigFile }) {
const functionalConfig = await readConfigFile(require.resolve('../functional/config'));
// Find all folders in ./plugins since we treat all them as plugin folder
const allFiles = fs.readdirSync(path.resolve(__dirname, 'plugins'));
const plugins = allFiles.filter(file => fs.statSync(path.resolve(__dirname, 'plugins', file)).isDirectory());
return {
testFiles: [
require.resolve('./test_suites/app_plugins'),
require.resolve('./test_suites/custom_visualizations'),
require.resolve('./test_suites/embedding_visualizations'),
require.resolve('./test_suites/panel_actions'),
require.resolve('./test_suites/embeddable_explorer'),
require.resolve('./test_suites/core_plugins'),
],
services: functionalConfig.get('services'),
pageObjects: functionalConfig.get('pageObjects'),
servers: functionalConfig.get('servers'),
esTestCluster: functionalConfig.get('esTestCluster'),
apps: functionalConfig.get('apps'),
esArchiver: {
directory: path.resolve(__dirname, '../es_archives')
},
screenshots: functionalConfig.get('screenshots'),
junit: {
reportName: 'Plugin Functional Tests',
},
kbnTestServer: {
...functionalConfig.get('kbnTestServer'),
serverArgs: [
...functionalConfig.get('kbnTestServer.serverArgs'),
...plugins.map(pluginDir => `--plugin-path=${path.resolve(__dirname, 'plugins', pluginDir)}`),
// Required to load new platform plugins via `--plugin-path` flag.
'--env.name=development',
],
},
};
}