[Timelion] Fix tests flakiness on suggestion click (#87273) (#87802)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Stratoula Kalafateli 2021-01-11 13:23:52 +02:00 committed by GitHub
parent 81378edcbf
commit 6ccb14e301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,14 +88,14 @@ export default function ({ getPageObjects }) {
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
expect(suggestions.length).to.eql(52);
expect(suggestions[0].includes('@message.raw')).to.eql(true);
await PageObjects.timelion.clickSuggestion(10);
await PageObjects.timelion.clickSuggestion(10, 2000);
});
it('should show field suggestions for metric argument when index pattern set', async () => {
await PageObjects.timelion.updateExpression(',metric');
await PageObjects.timelion.clickSuggestion();
await PageObjects.timelion.updateExpression('avg:');
await PageObjects.timelion.clickSuggestion();
await PageObjects.timelion.clickSuggestion(0, 2000);
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
expect(suggestions.length).to.eql(2);
expect(suggestions[0].includes('avg:bytes')).to.eql(true);