From 785c857ec78740db3c8847cd1fd9220dfe12bdc5 Mon Sep 17 00:00:00 2001 From: Giordano Ricci Date: Mon, 19 Dec 2022 14:21:00 +0000 Subject: [PATCH] QueryHistory: prevent query history tests from failing if the suite is rerun (#60462) remove all queries from query history after running suite --- e2e/various-suite/explore.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e2e/various-suite/explore.spec.ts b/e2e/various-suite/explore.spec.ts index d77248ead51..8ba2fede78e 100644 --- a/e2e/various-suite/explore.spec.ts +++ b/e2e/various-suite/explore.spec.ts @@ -47,5 +47,10 @@ e2e.scenario({ // Both queries above should have been run and be shown in the query history e2e.components.QueryTab.queryHistoryButton().should('be.visible').click(); e2e.components.QueryHistory.queryText().should('have.length', 2).should('contain', 'csv_metric_values'); + + // delete all queries + cy.get('button[title="Delete query"]').each((button) => { + button.trigger('click'); + }); }, });