[Console] Fix flaky autocomplete test for index fields (#208503)

This commit is contained in:
Ignacio Rivas 2025-01-29 15:36:02 +01:00 committed by GitHub
parent 270727b513
commit 4da814d138
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -373,8 +373,7 @@ GET _search
});
});
// FLAKY: https://github.com/elastic/kibana/issues/198109
describe.skip('index fields autocomplete', () => {
describe('index fields autocomplete', () => {
const indexName = `index_field_test-${Date.now()}-${Math.random()}`;
before(async () => {
@ -393,7 +392,11 @@ GET _search
it('fields autocomplete only shows fields of the index', async () => {
await PageObjects.console.clearEditorText();
await PageObjects.console.enterText('GET _search\n{\n"fields": ["');
await PageObjects.console.enterText('GET _search\n{\n"fields": [');
// Wait for the autocomplete request to finish loading
await PageObjects.header.waitUntilLoadingHasFinished();
// Trigger the autocomplete for the field we previously added
await PageObjects.console.enterText('te');
expect(await PageObjects.console.getAutocompleteSuggestion(0)).to.be.eql('test');
expect(await PageObjects.console.getAutocompleteSuggestion(1)).to.be.eql(undefined);