Skip to content

Commit e8e037b

Browse files
author
Kishore Kumaar Natarajan
committed
Update the logic in QueryInsights Dynamic Columns
Signed-off-by: Kishore Kumaar Natarajan <[email protected]>
1 parent c17203f commit e8e037b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cypress/e2e/1_top_queries.cy.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ describe('Query Insights Dashboard', () => {
2525
// Setup before each test
2626
beforeEach(() => {
2727
clearAll();
28-
cy.disableGrouping();
2928
cy.createIndexByName(indexName, sampleDocument);
3029
cy.enableTopQueries(METRICS.LATENCY);
3130
cy.enableTopQueries(METRICS.CPU);
3231
cy.enableTopQueries(METRICS.MEMORY);
3332
cy.searchOnIndex(indexName);
33+
// wait for 1s to avoid same timestamp
3434
cy.wait(1000);
3535
cy.searchOnIndex(indexName);
3636
cy.wait(1000);
3737
cy.searchOnIndex(indexName);
38+
// waiting for the query insights queue to drain
39+
cy.wait(10000);
3840
cy.navigateToOverview();
3941
});
4042

@@ -57,8 +59,10 @@ describe('Query Insights Dashboard', () => {
5759
* Validate sorting by the "Timestamp" column works correctly
5860
*/
5961
it('should sort the table by the Timestamp column', () => {
60-
// Click the Timestamp column header to sort
62+
// waiting for the query insights queue to drain
63+
cy.wait(10000);
6164
cy.navigateToOverview();
65+
// Click the Timestamp column header to sort
6266
cy.get('.euiTableHeaderCell').contains('Timestamp').click();
6367
// eslint-disable-next-line jest/valid-expect-in-promise
6468
cy.get('.euiTableRow')

0 commit comments

Comments
 (0)