# Backport
This will backport the following commits from `main` to `8.x`:
- [[OneDiscover] Contextual App Menu Extension Point
(#195448)](https://github.com/elastic/kibana/pull/195448)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-10-30T12:35:15Z","message":"[OneDiscover]
Contextual App Menu Extension Point (#195448)\n\n- Closes
https://github.com/elastic/kibana/issues/194269\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new extension point `getAppMenu`
which allows to:\r\n- add custom App Menu items (as a button or a
submenu with more actions)\r\n- extend Alerts menu item with more custom
actions\r\n\r\nAdditionally, this PR rearranges the existing Discover
menu items. The\r\nprimary actions are rendered as an icon only
now.\r\n\r\n\r\n\r\n\r\nThe
example usage of the new extension point can be found
in\r\ne7964f08e3/src/plugins/discover/public/context_awareness/profile_providers/example/example_data_source_profile/profile.tsx (L81-L168)\r\n\r\n###
For testing with the example profile\r\n\r\n1. Add
`discover.experimental.enabledProfiles:
['example-root-profile',\r\n'example-data-source-profile',
'example-document-profile']` to\r\n`kibana.dev.yml`\r\n2. Run the
following in DevTools\r\n```\r\nPOST _aliases\r\n{\r\n \"actions\":
[\r\n {\r\n \"add\": {\r\n \"index\": \"kibana_sample_data_logs\",\r\n
\"alias\": \"my-example-logs\"\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n3.
Create and use Data View with `my-custom-logs` index pattern\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This
renders correctly on smaller devices using a responsive\r\nlayout. (You
can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee <davis.mcphee@elastic.co>\r\nCo-authored-by: Davis McPhee
<davismcphee@hotmail.com>","sha":"811a23830bb60b7b56e08060bc9742fd232a5a8e","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","Project:OneDiscover"],"title":"[OneDiscover]
Contextual App Menu Extension
Point","number":195448,"url":"https://github.com/elastic/kibana/pull/195448","mergeCommit":{"message":"[OneDiscover]
Contextual App Menu Extension Point (#195448)\n\n- Closes
https://github.com/elastic/kibana/issues/194269\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new extension point `getAppMenu`
which allows to:\r\n- add custom App Menu items (as a button or a
submenu with more actions)\r\n- extend Alerts menu item with more custom
actions\r\n\r\nAdditionally, this PR rearranges the existing Discover
menu items. The\r\nprimary actions are rendered as an icon only
now.\r\n\r\n\r\n\r\n\r\nThe
example usage of the new extension point can be found
in\r\ne7964f08e3/src/plugins/discover/public/context_awareness/profile_providers/example/example_data_source_profile/profile.tsx (L81-L168)\r\n\r\n###
For testing with the example profile\r\n\r\n1. Add
`discover.experimental.enabledProfiles:
['example-root-profile',\r\n'example-data-source-profile',
'example-document-profile']` to\r\n`kibana.dev.yml`\r\n2. Run the
following in DevTools\r\n```\r\nPOST _aliases\r\n{\r\n \"actions\":
[\r\n {\r\n \"add\": {\r\n \"index\": \"kibana_sample_data_logs\",\r\n
\"alias\": \"my-example-logs\"\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n3.
Create and use Data View with `my-custom-logs` index pattern\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This
renders correctly on smaller devices using a responsive\r\nlayout. (You
can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee <davis.mcphee@elastic.co>\r\nCo-authored-by: Davis McPhee
<davismcphee@hotmail.com>","sha":"811a23830bb60b7b56e08060bc9742fd232a5a8e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195448","number":195448,"mergeCommit":{"message":"[OneDiscover]
Contextual App Menu Extension Point (#195448)\n\n- Closes
https://github.com/elastic/kibana/issues/194269\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new extension point `getAppMenu`
which allows to:\r\n- add custom App Menu items (as a button or a
submenu with more actions)\r\n- extend Alerts menu item with more custom
actions\r\n\r\nAdditionally, this PR rearranges the existing Discover
menu items. The\r\nprimary actions are rendered as an icon only
now.\r\n\r\n\r\n\r\n\r\nThe
example usage of the new extension point can be found
in\r\ne7964f08e3/src/plugins/discover/public/context_awareness/profile_providers/example/example_data_source_profile/profile.tsx (L81-L168)\r\n\r\n###
For testing with the example profile\r\n\r\n1. Add
`discover.experimental.enabledProfiles:
['example-root-profile',\r\n'example-data-source-profile',
'example-document-profile']` to\r\n`kibana.dev.yml`\r\n2. Run the
following in DevTools\r\n```\r\nPOST _aliases\r\n{\r\n \"actions\":
[\r\n {\r\n \"add\": {\r\n \"index\": \"kibana_sample_data_logs\",\r\n
\"alias\": \"my-example-logs\"\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n3.
Create and use Data View with `my-custom-logs` index pattern\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] This
renders correctly on smaller devices using a responsive\r\nlayout. (You
can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee <davis.mcphee@elastic.co>\r\nCo-authored-by: Davis McPhee
<davismcphee@hotmail.com>","sha":"811a23830bb60b7b56e08060bc9742fd232a5a8e"}}]}]
BACKPORT-->
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
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: