Skip to content

Commit

Permalink
[Timelion app] Stabilize the flakiness in cloud (elastic#106826)
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula authored and vadimkibana committed Aug 8, 2021
1 parent d9a44a8 commit 5d09ddf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/functional/apps/timelion/_expression_typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,31 @@ export default function ({ getPageObjects }) {
});

it('should show index pattern suggestions for index argument', async () => {
await PageObjects.timelion.updateExpression('index');
await PageObjects.timelion.clickSuggestion();
await PageObjects.timelion.updateExpression('index=');
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
expect(suggestions.length).to.eql(1);
expect(suggestions[0].includes('logstash-*')).to.eql(true);
await PageObjects.timelion.clickSuggestion();
});

it('should show field suggestions for timefield argument when index pattern set', async () => {
await PageObjects.timelion.updateExpression(',timefield');
await PageObjects.timelion.clickSuggestion();
await PageObjects.timelion.updateExpression(',timefield=');
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
expect(suggestions.length).to.eql(4);
expect(suggestions[0].includes('@timestamp')).to.eql(true);
await PageObjects.timelion.clickSuggestion();
});

it('should show field suggestions for split argument when index pattern set', async () => {
await PageObjects.timelion.updateExpression(',split');
await PageObjects.timelion.clickSuggestion();
await PageObjects.timelion.updateExpression(',split=');
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
expect(suggestions.length).not.to.eql(0);
expect(suggestions[0].includes('@message.raw')).to.eql(true);
await PageObjects.timelion.clickSuggestion(10);
});

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(',metric=');
await PageObjects.timelion.updateExpression('avg:');
await PageObjects.timelion.clickSuggestion(0);
const suggestions = await PageObjects.timelion.getSuggestionItemsText();
Expand Down

0 comments on commit 5d09ddf

Please sign in to comment.