Commit graph

100 commits

Author SHA1 Message Date
Tiago Costa
2442c16777
skip flaky suite (#151056) 2023-06-15 15:31:41 +01:00
Yulia Čech
3c8b26b53d
[Console] Add a setting to disable the a11y overlay (#158844)
## 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
2023-06-05 15:57:08 +02:00
Kibana Machine
2ef9994cbf skip failing test suite (#157776) 2023-05-26 14:43:09 -04:00
Tiago Costa
ad7cec95db
skip flaky suite (#155029) 2023-05-08 17:12:22 +01:00
Yulia Čech
b3807ba0b9
[Console] Fix an error with folds in the editor (#152366)
## 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)
2023-03-06 05:33:36 -07:00
Kibana Machine
fe0fd37498 skip failing test suite (#138160) 2023-03-02 14:38:26 -05:00
Tiago Costa
340d59276a
skip flaky suite (#145477) 2023-02-27 20:48:28 +00:00
Muhammad Ibragimov
4e68ec95a3
[Console] Add tests for Console's text input
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-10-11 12:48:01 +05:00
Muhammad Ibragimov
dfede09721
[Console] Add tests for XJSON (#136711)
* [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>
2022-10-10 18:40:02 +05:00
Muhammad Ibragimov
668a9899d3
[Console] Add tests for context menu and its actions (#141202)
* 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>
2022-09-26 17:04:09 +05:00
Muhammad Ibragimov
d67ecd9a66
[Console] Add tests for misc Console behavior (#141077)
* Add tests for misc console features

* Set window size

* Remove log statements

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-09-23 16:19:20 +05:00
Muhammad Ibragimov
cd52a2e641
[Console] Fix status badges not showing on cloud (#140873)
* 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>
2022-09-19 12:48:26 +05:00
liza-mae
22e78f9bb9
[console] skip failing test on cloud (#140837)
* [console] skip failing test on cloud

* Fix spacing
2022-09-15 12:29:28 -06:00
Rashmi Kulkarni
fb157fab77
unskipping a test to check on CI and FTR (#139756) 2022-09-08 17:10:02 -07:00
John Dorlus
5521574db2
unskip Comment console test 139295 (#140234)
* 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.
2022-09-08 13:35:41 -04:00
Kibana Machine
048e933cb4 skip failing test suite (#139295) 2022-08-23 08:52:43 -04:00
Tiago Costa
d5164311f2
skip flaky suite (#138160) 2022-08-22 13:54:27 +01:00
liza-mae
a9a1828a23
Fix console tests on cloud (#138682)
* 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>
2022-08-12 10:03:18 -06:00
CJ Cenizal
9e1ce81ff3
[Console] Handle encoded characters in API requests (#136788)
* Revert "Revert "[Console] Handle encoded characters in API requests (#135441)" (#136750)"

This reverts commit 44d4b2a8d7.

* Debug

* Fix requests failing on cloud

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-07-22 12:20:55 -07:00
Muhammad Ibragimov
1cbf53e355
[Console] Fix flaky tests (#136498)
* [Console] Fix flaky tests for comments and folds]

* Fix flaky test

* Remove dismissTutorial

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-07-22 11:09:22 -07:00
Muhammad Ibragimov
4ad72fc876
[Console] Fix syntax highlighting for triple quotes (#136719)
* [Console] Fix syntax highlighting for triple quotes

* Add tests

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-07-22 21:27:25 +05:00
CJ Cenizal
44d4b2a8d7
Revert "[Console] Handle encoded characters in API requests (#135441)" (#136750)
Preserve getResponseStatus page object function.
2022-07-20 17:15:44 -07:00
Muhammad Ibragimov
20edc9b02a
[Console] Support creating variables (#134215)
* Support creating variables

* Fix checks

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Fix type checks

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Parse input values

* Add case insensitive flag for parsing input

* Parse request in range

* Minor refactor
* Add functional tests
* Reduce bundle size

* Remove unused vars

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Memoize callbacks

* Minor refactor.

* Add unit tests
* Refactor

* Remove unused imports

* Fix functional tests

* Change modal to flyout

* Address comments

* Improve accessibility and usability

* Fix default request test case

* Fix checks

* Address comments

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-18 14:45:17 +05:00
Muhammad Ibragimov
b1f33c468d
[Console] Unskip flaky test (#136195)
* [Console] Unskip flaky test

* Wait until loading finishes

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-07-18 13:15:28 +05:00
Muhammad Ibragimov
65e307086f
[Console] Handle encoded characters in API requests (#135441)
* [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>
2022-07-14 08:53:51 +05:00
Tiago Costa
52c9de890a
skip flaky suite (#135914) 2022-07-08 18:18:32 +01:00
Muhammad Ibragimov
b809237f84
[Console] Save state of folding/unfolding of commands (#134810)
* 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>
2022-07-07 13:49:38 +05:00
Muhammad Ibragimov
44ba4bcecc
[Console] Support request-body comments (#133852)
* Add support for request-body comments
* Add unit tests

* Disable autocomplete for commented-out lines

* Add indentation for comments

* Improve code readability and tests around commenting behavior

* Remove unnecessary code blocks from tests

* Address comments

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-27 14:39:46 +05:00
John Dorlus
68e569bd7d
Fixed the query to make sure results contain the expected document. (#134154) 2022-06-13 10:02:23 -04:00
Muhammad Ibragimov
b5b68bb601
[Console] Improve UX around handling multiple requests (#132494)
* Render status badges in the output panel

* Add missing dependancy for useEffect hook

* Lint

* Add functional tests

* Update tests

* Fix tests

* Update selectAll command key for firefox

* Fix selecting all requests in tests

* Convert output modes to TS

* Fix checks

* Fix types for editor session.update method

* Add tests for mapStatusCodeToBadge function

* Address comments

* Change .ace-badge font family to $euiFontFamily

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-06 13:34:26 +05:00
John Dorlus
1d348b2bb7
Added the console CCS test. (#133545)
* Added the console CCS test.

* Forgot some awaits.
2022-06-03 17:05:58 -04:00
John Dorlus
b29c645bda
Fix for Console Test (#129276)
* 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.
2022-05-18 19:29:30 -04:00
Spencer
542b381fa5
[ftr] automatically determine config run order (#130983)
* [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>
2022-05-04 17:05:58 -05:00
Alison Goryachev
47918ae0be
[Console] Add Kibana APIs Support (#130816)
* Revert "Revert "[Console] Add Kibana APIs Support (#128562)""

This reverts commit f41dc1fcc9.

* fix functional test
2022-04-21 14:30:14 -07:00
Jonathan Budzenski
f41dc1fcc9 Revert "[Console] Add Kibana APIs Support (#128562)"
This reverts commit 502a00b025.
2022-04-21 10:26:40 -05:00
Muhammad Ibragimov
502a00b025
[Console] Add Kibana APIs Support (#128562)
* Add support for Kibana API requests

* Fix failing tests

* Support leading / and minor refactor

* Resolve conflicts

* Update send_request.test file

* Refactor

* Add functional test

* Address comments

* Fix typo

* Resolve conflicts and refactor error handling

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Address comments

* Resolve merge conflicts

* Rename KIBANA_API_KEYWORD

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-21 09:49:04 -05:00
Muhammad Ibragimov
6447923591
[Console] Fix condition auto-completion for templates (#126881)
* Fix condition autocompletion for templates

* Added block level matching logic

* Fix lint

* Fixed types

* Resolved comments

* Added a custom type guard

* Minor refactor

* Add type to type imports

* Add functional tests and comments

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-21 03:45:18 -07:00
Max Kovalev
ee7f7dfc9f
[Maps] Display vector tile API response in Console (#128922)
* #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>
2022-04-13 13:19:55 -06:00
Muhammad Ibragimov
8a0cc6efcd
[Console] Remove use of jQuery (#127867)
* Remove jquery

* Fixed failing functional test

* Fixed failing jest test

* Lint

* Address comments

* Remove unused imports

* Remove unused imports

* Get http service through context

* Import http to services mock

* Fix use_send_current_request_to_es.test

* Add tests for send_request_to_es logic

* Address comments

* Fix base path

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-04-07 02:38:04 -07:00
Jonathan Budzenski
c591e46aa3 skip flaky suite. #126414 2022-03-24 08:46:02 -05:00
Muhammad Ibragimov
77ac1d822f
Unskip flaky tests (#126743)
Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-04 13:01:46 +05:00
Tiago Costa
1ded153692
skip flaky suite (#126414) 2022-02-28 13:21:36 +00:00
Kibana Machine
d499ed533a skip failing test suite (#126421) 2022-02-27 00:54:58 -05:00
Muhammad Ibragimov
45a003fa06
[Console] unskip flaky tests (#124783)
* Unskip flaky console tests

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-25 10:03:53 +05:00
Tiago Costa
822edb4f58
skip flaky suite (#123556) 2022-02-01 03:30:43 +00:00
Tiago Costa
b942e5609b
skip flaky suite (#124104) 2022-02-01 02:16:13 +00:00
Muhammad Ibragimov
17134697a0
[Console] Fix autocomplete inserting comma in triple quotes (#123572)
* 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>
2022-01-31 11:58:13 +02:00
Brian Seeders
556d00d3a8
skip single flaky test #123556 2022-01-23 16:15:32 -05:00
Brian Seeders
a2677b8163
Revert "skip failing test suite (#123456)"
This reverts commit ac72ef20f8.
2022-01-23 16:12:23 -05:00
Kibana Machine
ac72ef20f8 skip failing test suite (#123456) 2022-01-23 08:43:35 -05:00