Skip to content

Commit

Permalink
[8.10] [Discover] Fix ESQL flaky test (#166249) (#166586)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.10`:
- [[Discover] Fix ESQL flaky test
(#166249)](#166249)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2023-09-18T07:35:12Z","message":"[Discover]
Fix ESQL flaky test (#166249)\n\n- Closes
#165860
Fix ESQL flaky test (#166249)\n\n- Closes
#165860
Fix ESQL flaky test (#166249)\n\n- Closes
#165860"}}]}]
BACKPORT-->
  • Loading branch information
jughosta committed Sep 19, 2023
1 parent 014ae79 commit 2955560
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/apps/discover/group2/_sql_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,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 heatmap so it is rendered
expect(await testSubjects.exists('unifiedHistogramChart')).to.be(true);
expect(await testSubjects.exists('heatmapChart')).to.be(true);
Expand All @@ -110,16 +111,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, 4);
expect(await cell.getVisibleText()).to.be('2269');
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, 4);
expect(await cell.getVisibleText()).to.be('2269');
});
Expand Down

0 comments on commit 2955560

Please sign in to comment.