[8.17] [Console] Refactor flaky test (#209516) (#209727)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Console] Refactor flaky test
(#209516)](https://github.com/elastic/kibana/pull/209516)

<!--- 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-02-05T10:28:46Z","message":"[Console]
Refactor flaky test
(#209516)","sha":"86497d5e7f64816b3fc2a081f84a8e686f262e57","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.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","v9.1.0","v8.19.0"],"title":"[Console]
Refactor flaky
test","number":209516,"url":"https://github.com/elastic/kibana/pull/209516","mergeCommit":{"message":"[Console]
Refactor flaky test
(#209516)","sha":"86497d5e7f64816b3fc2a081f84a8e686f262e57"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209516","number":209516,"mergeCommit":{"message":"[Console]
Refactor flaky test
(#209516)","sha":"86497d5e7f64816b3fc2a081f84a8e686f262e57"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
This commit is contained in:
Kibana Machine 2025-02-06 00:38:14 +11:00 committed by GitHub
parent c990c7c5f7
commit 50d18b419a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -160,15 +160,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.console.pressEnter();
await PageObjects.console.sleepForDebouncePeriod();
expect((await PageObjects.console.getEditorText()).replace(/\s/g, '')).to.be.eql(
// Verify that the autocomplete suggestion is inserted into the editor
expect((await PageObjects.console.getEditorText()).replace(/\s/g, '')).to.contain(
`
GET _search
{
"aggs": {
"NAME": {
"AGG_TYPE": {}
}
}
"aggs": {
"NAME": {
"AGG_TYPE": {}
}
}
`.replace(/\s/g, '')
);