mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
Fixes various syntax and rendering errors that might include: * Fixing broken images * Hardcoding book-level substitution values * Fixing incorrectly closed blocks (admonitions, tab sets, code blocks, dropdowns etc.) * Fixing poorly migrated complex tables * Fixing poorly migrated lists * Fixing poorly migrated tab sets * Removing inline text formatting from directive titles where they won't be rendered (for example, inline `code` formatting in dropdown titles) * Specifying if a version is trying to communicate if a feature was added, deprecated, or coming (for example, during migration `deprecated:[8.15.0]` became `[8.15.0]`, which doesn't give any information about _what_ happened in 8.15.0) * Note: I used an `{admonition}` for this, but you can change it to prose or some other kind of admonition if you want. * Fixing nested dropdowns / definition lists * Fixing poorly migrated footnotes * Updating references to prerelease `9.0.0` versions (using a repo-level substitution until there is a solution to https://github.com/elastic/docs-builder/issues/737) Links to pages that were updated: | Before | After | |---|---| | https://www.elastic.co/docs/extend/kibana/development-documentation | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-documentation | | https://www.elastic.co/docs/extend/kibana/development-security | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-security | | https://www.elastic.co/docs/extend/kibana/development-tests | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-tests | | https://www.elastic.co/docs/extend/kibana/external-plugin-functional-tests | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-functional-tests | | https://www.elastic.co/docs/extend/kibana/external-plugin-localization | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-localization | | https://www.elastic.co/docs/extend/kibana/interpreting-ci-failures | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/interpreting-ci-failures | | https://www.elastic.co/docs/extend/kibana/plugin-list | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/plugin-list | | https://www.elastic.co/docs/extend/kibana/sample-data | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sample-data | | https://www.elastic.co/docs/extend/kibana/saved-objects-service | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/saved-objects-service | | https://www.elastic.co/docs/extend/kibana/sharing-saved-objects | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sharing-saved-objects | | https://www.elastic.co/docs/extend/kibana/stability | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/stability | | https://www.elastic.co/docs/reference/kibana/advanced-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/advanced-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/ai-assistant-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/ai-assistant-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/fleet-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/fleet-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/general-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/monitoring-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/monitoring-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/reporting-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/reporting-settings | | https://www.elastic.co/docs/reference/kibana/configuration-reference/task-manager-settings | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/task-manager-settings | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/cases-webhook-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/cases-webhook-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/email-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/email-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/pre-configured-connectors | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/pre-configured-connectors | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-itom-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-itom-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-sir-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-sir-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/thehive-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/thehive-action-type | | https://www.elastic.co/docs/reference/kibana/connectors-kibana/webhook-action-type | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/webhook-action-type | | https://www.elastic.co/docs/reference/kibana/kibana-audit-events | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-audit-events | | https://www.elastic.co/docs/reference/kibana/kibana-plugins | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-plugins | | https://www.elastic.co/docs/release-kibana/notes/index | https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/release-notes/index | --------- Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
85 lines
3.1 KiB
Markdown
85 lines
3.1 KiB
Markdown
---
|
||
mapped_pages:
|
||
- https://www.elastic.co/guide/en/kibana/current/external-plugin-functional-tests.html
|
||
---
|
||
|
||
# Functional Tests for Plugins outside the Kibana repo [external-plugin-functional-tests]
|
||
|
||
Plugins use the `FunctionalTestRunner` by running it out of the {{kib}} repo. Ensure that your {{kib}} Development Environment is setup properly before continuing.
|
||
|
||
|
||
## Writing your own configuration [_writing_your_own_configuration]
|
||
|
||
Every project or plugin should have its own `FunctionalTestRunner` config file. Just like {{kib}}'s, this config file will define all of the test files to load, providers for Services and PageObjects, as well as configuration options for certain services.
|
||
|
||
To get started copy and paste this example to `src/platform/test/functional/config.js`:
|
||
|
||
```js subs=true
|
||
import { resolve } from 'path';
|
||
import { REPO_ROOT } from '@kbn/utils';
|
||
|
||
import { MyServiceProvider } from './services/my_service';
|
||
import { MyAppPageProvider } from './services/my_app_page';
|
||
|
||
// the default export of config files must be a config provider
|
||
// that returns an object with the projects config values
|
||
export default async function ({ readConfigFile }) {
|
||
|
||
// read the Kibana config file so that we can utilize some of
|
||
// its services and PageObjects
|
||
const kibanaConfig = await readConfigFile(resolve(REPO_ROOT, 'src/platform/test/functional/config.base.js'));
|
||
|
||
return {
|
||
// list paths to the files that contain your plugins tests
|
||
testFiles: [
|
||
resolve(__dirname, './my_test_file.js'),
|
||
],
|
||
|
||
// define the name and providers for services that should be
|
||
// available to your tests. If you don't specify anything here
|
||
// only the built-in services will be available
|
||
services: {
|
||
...kibanaConfig.get('services'),
|
||
myService: MyServiceProvider,
|
||
},
|
||
|
||
// just like services, PageObjects are defined as a map of
|
||
// names to Providers. Merge in Kibana's or pick specific ones
|
||
pageObjects: {
|
||
management: kibanaConfig.get('pageObjects.management'),
|
||
myApp: MyAppPageProvider,
|
||
},
|
||
|
||
// the apps section defines the urls that
|
||
// `PageObjects.common.navigateTo(appKey)` will use.
|
||
// Merge urls for your plugin with the urls defined in
|
||
// Kibana's config in order to use this helper
|
||
apps: {
|
||
...kibanaConfig.get('apps'),
|
||
myApp: {
|
||
pathname: '/app/my_app',
|
||
}
|
||
},
|
||
|
||
// choose where screenshots should be saved
|
||
screenshots: {
|
||
directory: resolve(__dirname, './tmp/screenshots'),
|
||
}
|
||
|
||
// more settings, like timeouts, mochaOpts, etc are
|
||
// defined in the config schema.
|
||
// https://github.com/elastic/kibana/blob/{{branch}}/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/config/schema.ts
|
||
};
|
||
}
|
||
```
|
||
|
||
From the root of your repo you should now be able to run the `FunctionalTestRunner` script from your plugin project.
|
||
|
||
```shell
|
||
node ../../kibana/scripts/functional_test_runner
|
||
```
|
||
|
||
|
||
## Using esArchiver [_using_esarchiver]
|
||
|
||
We’re working on documentation for this, but for now the best place to look is the original [pull request](https://github.com/elastic/kibana/issues/10359).
|