## Summary
Fixes https://github.com/elastic/kibana/issues/16139
This PR adds a setting in Console that allows to disable the a11y
overlay. The default will be set to `enabled` so that the default
behaviour should not change. A user can disable the overlay in their
browser and the setting is saved in local storage. So that other users
are not affected by that change.
The reason to allow disabling the overlay is that it can be flaky and
sometimes it's displayed when not intended. The code relies on
`querySelector` (see this
[file](1b3f23829c/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx (L25)))
so I think that causes the flakiness and that is very difficult to test
reliably.
### Screenshot
#### A11y overlay (no changes)
<img width="1483" alt="Screenshot 2023-06-01 at 16 34 23"
src="d776625c-92cd-4bd9-8e5e-2f672df351a4">
#### Settings modal with the new option to disable the a11y overlay
<img width="474" alt="Screenshot 2023-06-01 at 16 29 02"
src="8745c7a0-62f4-41a9-9eff-ff8bebd4f767">
#### How to test
1. Start Kibana and navigate to the Console
2. Press ESC when textarea is focused and now autocomplete popup is
displayed to see the a11y overlay
3. Open the Settings modal and disable the a11y overlay
4. Press ESC in the textarea again to see that no overlay is now
displayed
5. Check that the value is persisted in the local storage
Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2346
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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
## Summary
Fixes https://github.com/elastic/kibana/issues/151563
There is a combination of the folds in the editor (collapsed lines) and
the text that can cause the editor to fail. This PR adds a try/catch
clause to the editor, so that the UI can still be used.
### How to use
1. Open Kibana and in your browser's Dev Tools, delete everything from
local storage.
2. Add following 2 items back to the local storage:
```
sense:folds [{"start":{"row":1,"column":1},"end":{"row":82,"column":4}}]
sense:console_local_text-object_e69f508c-3342-45cf-ae7c-2753548ce8e7 {"id":"e69f508c-3342-45cf-ae7c-2753548ce8e7","createdAt":1675332935410,"updatedAt":1676630754720,"text":"GET _cat/indices"}
```
3. Navigate to Console in Kibana, make sure the editor works.
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
* [Console] Add tests for XJSON
* Convert rgb to hex
* Address CR changes
* Expand test coverage for XJSON
* Retry until typing is finished
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add tests for context menu and its actions
* Skip test if clipboard permission is not granted
* Fix type checks
* Remove log statement
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
* Fix status badges not showing up in cloud
* Unskip related test file
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Updated test to use uiSettings.
* Pushing test to run in CI.
* Pushing test to run in CI.
* Fixed issue with merge conflict and removed comment for skipped test.
* Fix console test on cloud
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Fix access to sample data
* Clean up access after test
* Fix restore test
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* [Console] Fix flaky tests for comments and folds]
* Fix flaky test
* Remove dismissTutorial
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
* [Console] Handle encoded characters in API requests
* Add a functional test for requests with query params
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
* Persist fold states and restore it back from storage
* Add tests
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Added some wait conditions to ensure that the comma is present before trying to make assertion.
* Added check to verify inner html.
* Switched wait to retry.
* Fixed duplicate declaration.
* Fixed PR per nits.
* [ftr] automatically determine config run order
* split lens config into two groups
* support ftr configs always running against CI
* Split detection_engine_api_integration rule exception list tests
* Add configs from previous commit
* [ftr] remove testMetadata and maintain a unique lifecycle instance per run
* Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run"
This reverts commit d2b4fdb824.
* Split alerting_api_integration/security_and_spaces tests
* Add groups to yaml
* Revert "Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run""
This reverts commit 56232eea68.
* stop ES more forcefully and fix timeout
* only cleanup lifecycle phases when the cleanup is totally complete
* only use kill when cleaning up an esTestInstance
* fix broken import
* fix runOptions.alwaysUseSource implementation
* fix config access
* fix x-pack/ccs config
* fix ml import file paths
* update kibana build id
* revert array.concat() change
* fix baseConfig usage
* fix pie chart data
* split up maps tests
* pull in all of group5 so that es archives are loaded correctly
* add to ftr configs.yml
* fix pie chart data without breaking legacy version
* fix more pie_chart stuff in new vis lib
* restore normal PR tasks
* bump kibana-buildkite-library
* remove ciGroup validation
* remove the script which is no longer called from checks.sh
* [CI] Auto-commit changed files from 'yarn kbn run build -i @kbn/pm'
* adapt flaky test runner scripts to handle ftrConfig paths
* fix types in alerting_api_integration
* improve flaky config parsing and use non-local var name for passing explicit configs to ftr_configs.sh
* Split xpack dashboard tests
* Add configs
* [flaky] remove key from ftr-config steps
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* restore cypress builds
* remove ciGroups from FTR config files
* fixup some docs
* add temporary script to hunt for FTR config files
* use config.base.js naming for clarity
* use script to power ftr_configs.yml
* remove usage of removed x-pack/scripts/functional_tests
* fix test names in dashboard snapshots
* bump kibana-buildkite-library
* Try retrying only failed configs
* be a little quieter about trying to get testStats from configs with testRunners defined
* Remove test code
* bump kibana-buildkite-library
* update es_snapshot and on_merge jobs too
* track duration and exit code for each config and print it at the end of the script
* store results in order, rather than by key, in case there are duplicates in $config
* bash is hard
* fix env source and use +e rather than disabling e for whole file
* bash sucks
* print config summary in jest jobs too
* define results in jest_parallel.sh
* simplify config summary print, format times a little better
* fix reference to unbound time variable, use better variable name
* skip the newline between each result
* finish with the nitpicking
* sync changes with ftr_configs.sh
* refuse to execute config files which aren't listed in the .buildkite/ftr_configs.yml
* fix config.edge.js base config import paths
* fix some readmes
* resolve paths from ftr_configs manifest
* fix readConfigFile tests
* just allow __fixtures__ configs
* list a few more cypress config files
* install the main branch of kibana-buildkite-library
* split up lens group1
* move ml data_visualizer tests to their own config
* fix import paths
* fix more imports
* install specific commit of buildkite-pipeline-library
* sort configs in ftr_configs.yml
* bump kibana-buildkite-library
* remove temporary script
* fix env var for limiting config types
* Update docs/developer/contributing/development-functional-tests.asciidoc
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
* produce a JUnit report for saved objects field count
* apply standard concurrency limits from flaky test runner
* support customizing FTR concurrency via the env
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
* #128534 - display vector tile API response in Console
* 128534 - removing unused jquery
* 128534 - changing package.json to fix imports
* 128534 - fixed yarn.lock
* 128543 - transforming the result of vector tile API response
* 128534 - fixed translations
* 128534 - updated structure of the API response
* 128534 - refactoring; Updating the response format of API
* 128534 - moving convert function to separate file
* 128534 - added test; ACE support for vectorTiles output
* 128534 - refactoring for test file
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* 128534 - logic changed due to removing jquery
* Update src/plugins/console/public/application/containers/editor/legacy/console_editor/editor_output.tsx
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
* Update src/plugins/console/public/application/hooks/use_send_current_request_to_es/send_request_to_es.ts
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
* 128534 - added functional test
* 128534 - fix for undefined value of editorOutput in some cases
* 128534 - tests was updated; New query example added
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
* Fix autocomplete inserting comma in triple quotes
* Fix inserting commas and flaky test
* Fixed problems on triple quotes and single quotes replacement.
* Fixed cursor position after adding a comma to the prefix.
* Final generic solution for multiple edge cases.
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>