[8.x] [Console] Fix flaky autocomplete functional tests (#208322) (#208371)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Console] Fix flaky autocomplete functional tests
(#208322)](https://github.com/elastic/kibana/pull/208322)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2025-01-27T14:01:19Z","message":"[Console]
Fix flaky autocomplete functional tests
(#208322)","sha":"458704f475fbd6c291aea13f636d9c0ffd78535f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-major"],"title":"[Console]
Fix flaky autocomplete functional
tests","number":208322,"url":"https://github.com/elastic/kibana/pull/208322","mergeCommit":{"message":"[Console]
Fix flaky autocomplete functional tests
(#208322)","sha":"458704f475fbd6c291aea13f636d9c0ffd78535f"}},"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/208322","number":208322,"mergeCommit":{"message":"[Console]
Fix flaky autocomplete functional tests
(#208322)","sha":"458704f475fbd6c291aea13f636d9c0ffd78535f"}}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
This commit is contained in:
Kibana Machine 2025-01-28 02:46:13 +11:00 committed by GitHub
parent 7ba1c49143
commit e2caff5f90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('should provide basic auto-complete functionality', async () => {
await PageObjects.console.enterText(`GET _search\n`);
await PageObjects.console.pressEnter();
await PageObjects.console.enterText(`{\n\t"query": {`);
await PageObjects.console.pressEnter();
await PageObjects.console.sleepForDebouncePeriod();
@ -146,6 +145,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('JSON autocompletion with placeholder fields', async () => {
await PageObjects.console.enterText('GET _search\n');
await PageObjects.console.enterText('{');
await PageObjects.console.sleepForDebouncePeriod();
await PageObjects.console.pressEnter();
for (const char of '"ag') {