* Update docs to handle kibana-extra * Add info about plugin directory structure to docs
This commit is contained in:
parent
decde4d5d0
commit
49d2ffd038
|
@ -13,20 +13,18 @@ To get started copy and paste this example to `test/functional/config.js`:
|
||||||
["source","js"]
|
["source","js"]
|
||||||
-----------
|
-----------
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
import { resolveKibanaPath } from '@elastic/plugin-helpers';
|
||||||
|
|
||||||
import { MyServiceProvider } from './services/my_service';
|
import { MyServiceProvider } from './services/my_service';
|
||||||
import { MyAppPageProvider } from './services/my_app_page;
|
import { MyAppPageProvider } from './services/my_app_page;
|
||||||
|
|
||||||
// allow overriding the default kibana directory
|
|
||||||
// using the KIBANA_DIR environment variable
|
|
||||||
const KIBANA_CONFIG_PATH = resolve(process.env.KIBANA_DIR || '../kibana', 'test/functional/config.js');
|
|
||||||
|
|
||||||
// the default export of config files must be a config provider
|
// the default export of config files must be a config provider
|
||||||
// that returns an object with the projects config values
|
// that returns an object with the projects config values
|
||||||
export default async function ({ readConfigFile }) {
|
export default async function ({ readConfigFile }) {
|
||||||
|
|
||||||
// read the Kibana config file so that we can utilize some of
|
// read the Kibana config file so that we can utilize some of
|
||||||
// its services and PageObjects
|
// its services and PageObjects
|
||||||
const kibanaConfig = await readConfigFile(KIBANA_CONFIG_PATH);
|
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// list paths to the files that contain your plugins tests
|
// list paths to the files that contain your plugins tests
|
||||||
|
@ -81,7 +79,7 @@ From the root of your repo you should now be able to run the `FunctionalTestRunn
|
||||||
|
|
||||||
["source","shell"]
|
["source","shell"]
|
||||||
-----------
|
-----------
|
||||||
node ../kibana/scripts/functional_test_runner
|
node ../../kibana/scripts/functional_test_runner
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
|
|
|
@ -20,7 +20,20 @@ Many Kibana developers hang out on `irc.freenode.net` in the `#kibana` channel.
|
||||||
[float]
|
[float]
|
||||||
==== Plugin Generator
|
==== Plugin Generator
|
||||||
|
|
||||||
Check out the https://github.com/elastic/generator-kibana-plugin[plugin generator] to kick-start your plugin.
|
Check out the https://github.com/elastic/template-kibana-plugin/[plugin generator] to kick-start your plugin.
|
||||||
|
|
||||||
|
[float]
|
||||||
|
==== Directory structure for plugins
|
||||||
|
|
||||||
|
The Kibana directory must be named `kibana`, and your plugin directory must be located within the sibling `kibana-extra` folder, for example:
|
||||||
|
|
||||||
|
["source","shell"]
|
||||||
|
-----------
|
||||||
|
.
|
||||||
|
├── kibana
|
||||||
|
├── kibana-extra/foo-plugin
|
||||||
|
└── kibana-extra/bar-plugin
|
||||||
|
-----------
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
==== References in the code
|
==== References in the code
|
||||||
|
|
Loading…
Reference in a new issue