kibana/test/examples
Julia Rechkunova 811a23830b
[OneDiscover] Contextual App Menu Extension Point (#195448)
- Closes https://github.com/elastic/kibana/issues/194269

## Summary

This PR introduces a new extension point `getAppMenu` which allows to:
- add custom App Menu items (as a button or a submenu with more actions)
- extend Alerts menu item with more custom actions

Additionally, this PR rearranges the existing Discover menu items. The
primary actions are rendered as an icon only now.

![Oct-16-2024
17-43-29](https://github.com/user-attachments/assets/dbb67513-05bb-43a4-bd7b-cf958c58a167)


The example usage of the new extension point can be found in
e7964f08e3/src/plugins/discover/public/context_awareness/profile_providers/example/example_data_source_profile/profile.tsx (L81-L168)

### For testing with the example profile

1. Add `discover.experimental.enabledProfiles: ['example-root-profile',
'example-data-source-profile', 'example-document-profile']` to
`kibana.dev.yml`
2. Run the following in DevTools
```
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "kibana_sample_data_logs",
        "alias": "my-example-logs"
      }
    }
  ]
}
```
3. Create and use Data View with `my-custom-logs` index pattern

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2024-10-30 13:35:15 +01:00
..
bfetch_explorer Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
content_management Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
data_view_field_editor_example Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
discover_customization_examples [OneDiscover] Contextual App Menu Extension Point (#195448) 2024-10-30 13:35:15 +01:00
error_boundary Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
expressions_explorer [Dashboard] Remove library and drilldown notifications (#190797) 2024-09-09 14:11:15 -07:00
field_formats Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
hello_world Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
partial_results Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
response_stream Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
routing Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
search Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
state_sync Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
ui_actions [Dashboard] Remove library and drilldown notifications (#190797) 2024-09-09 14:11:15 -07:00
unified_field_list_examples Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
config.js Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
README.md Add top level examples folder and command to run, --run-examples. (#52027) 2019-12-10 18:02:03 -05:00

Example plugin functional tests

This folder contains functional tests for the example plugins.

Run the test

To run these tests during development you can use the following commands:

# Start the test server (can continue running)
node scripts/functional_tests_server.js --config test/examples/config.js
# Start a test run
node scripts/functional_test_runner.js --config test/examples/config.js

Run Kibana with a test plugin

In case you want to start Kibana with the example plugins, you can just run:

yarn start --run-examples