Skip to content

Commit

Permalink
Fixes flakiness in timelion viz functional test (#112805)
Browse files Browse the repository at this point in the history
* Fixes flakiness in timelion viz functional test

* Add sleep
  • Loading branch information
stratoula authored Sep 22, 2021
1 parent 1456257 commit 6bf766a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/functional/apps/visualize/_timelion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,20 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should show field suggestions for split argument when index pattern set', async () => {
await monacoEditor.setCodeEditorValue('');
await monacoEditor.typeCodeEditorValue(
'.es(index=logstash-*, timefield=@timestamp ,split=',
'.es(index=logstash-*, timefield=@timestamp, split=',
'timelionCodeEditor'
);
// wait for split fields to load
await common.sleep(300);
const suggestions = await timelion.getSuggestionItemsText();

expect(suggestions.length).not.to.eql(0);
expect(suggestions[0].includes('@message.raw')).to.eql(true);
});

it('should show field suggestions for metric argument when index pattern set', async () => {
await monacoEditor.typeCodeEditorValue(
'.es(index=logstash-*, timefield=@timestamp ,metric=avg:',
'.es(index=logstash-*, timefield=@timestamp, metric=avg:',
'timelionCodeEditor'
);
const suggestions = await timelion.getSuggestionItemsText();
Expand Down

0 comments on commit 6bf766a

Please sign in to comment.