Skip to content

Commit

Permalink
[Discover] Fix ESQL flaky test (elastic#166249)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored Sep 18, 2023
1 parent 1093847 commit fd60453
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/apps/discover/group2/_esql_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await monacoEditor.setCodeEditorValue(testQuery);
await testSubjects.click('querySubmitButton');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.waitUntilSearchingHasFinished();
// here Lens suggests a XY so it is rendered
expect(await testSubjects.exists('unifiedHistogramChart')).to.be(true);
expect(await testSubjects.exists('xyVisChart')).to.be(true);
Expand All @@ -104,16 +105,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await monacoEditor.setCodeEditorValue(testQuery);
await testSubjects.click('querySubmitButton');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.waitUntilSearchingHasFinished();
let cell = await dataGrid.getCellElement(0, 2);
expect(await cell.getVisibleText()).to.be('1');
await PageObjects.timePicker.setAbsoluteRange(
'Sep 19, 2015 @ 06:31:44.000',
'Sep 19, 2015 @ 06:31:44.000'
);
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.waitUntilSearchingHasFinished();
expect(await testSubjects.exists('discoverNoResults')).to.be(true);
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.waitUntilSearchingHasFinished();
cell = await dataGrid.getCellElement(0, 2);
expect(await cell.getVisibleText()).to.be('1');
});
Expand Down

0 comments on commit fd60453

Please sign in to comment.